$(function(){
var f_windowWidth = function (w) {
if (w <= n) {
console.log("Window width <= " + n);
} else {
console.log("Window width > " + n)
}
};
var n = 800, w = window.innerWidth, timer, anyTime = 300;
f_windowWidth(w);
$(window).on('resize', function () {
if (timer !== undefined) {
clearTimeout(timer);
} else {
timer = setTimeout(function () {
var w = window.innerWidth;
f_windowWidth(w);
}, anyTime);
}
});
});
$("#block :checkbox").on("change", function () {
$.post(myajax.url, data, function (response) {
$("#block").html(response);
});
});