To attach resize event to a html element, resize()
method can be used.
<script>
$(window).resize(function () {
$("#divResize").text("Window size is: " + $(window).width());
});
</script>
In the above code when user resize the window then browser window width is be written inside “divResize”.
Views: 4806 | Post Order: 82