How can I add a window resize function to this?
jQuery(document).ready(function($){
var $MyDiv1 = $('#mydiv1');
if ($MyDiv1.length && $MyDiv1.css('position') == 'fixed') {
console.log ( '#mydiv1 is fixed' );
} else {
console.log ( '#mydiv1 is not fixed' );
}
});
This work if I refresh the page after the resizing. I want to check the MyDiv1 position is fixed or not when the window is resizing. Thanks for any help.