This might be very stupid, but I am not sure where I am wrong. I found jQuery 'resize()' not work at all. Check this fiddle: http://jsfiddle.net/FefFW/1/
<div id="log"></div>
jQuery:
$(function(){
$('#log').append('<h3>event log</h3><hr/>');
$('window').resize(function(){
$('#log').append('<p>resizing...</p>');
});
});
"window" is not a selector; there is no <window> element.
You want $(window).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With