resizer fix - doResizeEnd and testBlock

resizer fix - doResizeEnd and testBlock

by Yury

JavaScript

var resizeTimer = 0;


//    jQuery('body').append('<span id="testSpan"> &nbsp; x &nbsp; </span>');
//    jQuery('#testSpan').css({position: 'fixed', display: 'block', zIndex: '99999', bottom: '40%', right: '0.5%', width: '120px', border: '1px solid green', borderRadius: '6px', font: '1.2em/1.2em "Trebuchet MS", Helvetica, sans-serif', textAlign: 'center', opacity: 0.8, background: 'rgba(255, 255, 255, 0.5)'}).text(jQuery(window).width() + ' x ' + jQuery(window).height());

    jQuery(window).resize(function() {
//        jQuery('#testSpan').text(jQuery(window).width() + ' x ' + jQuery(window).height());

        if (resizeTimer)
            clearTimeout(resizeTimer);
        resizeTimer = setTimeout(doResizeEnd, 300);
        // *** move functions for execute at end of resize event into doResizeEnd() *** //
    });
//});

function doResizeEnd() {
    // *** move here functions for execute at end of resize event *** //
}