Hi-
I am using this code that essentially has a fullscreen div, when you click the button, another fullscreen div slides in.
$(document).ready(function() {
$("a#controlbtn").click(function(e) {
e.preventDefault();
var slidepx=$("div#linkblock").width();
if ( !$("div#maincontent").is(':animated') ) {
if (parseInt($("div#maincontent").css('left'), 10) < slidepx) {
$(this).removeClass('close').html('Hide your stuffs');
lleft = "+=" + slidepx;
} else {
$(this).addClass('close').html('Show your stuffs');
lleft = "-=" + slidepx;
}
$("div#maincontent").animate({
left: lleft
}, {
duration: 'slow',
easing: 'easeOutQuint'
});
}
});
});
My question is:
Since the width of the div is determined on the page load of div#linkblock, is there a way when the window is re-sized to grab the new value?