How to use Event Resize() Method in JQuery
In this article I am going to explain about event resize() method in jquery
jQuery Event Resize() Method
jquery resize event occurs when any change in window browser and resize() method will be executed. Its defined what done at the time of when event occurs.
Syntax
Example
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
mm = 0;
$(document).ready(function () {
$(window).resize(function () {
$("h1").text(mm += 1);
});
$("button").click(function () {
$(window).resize();
});
});
</script>
</head>
<body>
<p>
Resize Time<h1 style="color: Red">
0</h1>
</p>
<p>
Resize for browser window</p>
<button>
click me</button>
</body>
</html>
|
Output
You may also want to read these related articles: here
Ask Your Question
Got a programming related question? You may want to post your question here