When I run this one time it gives me window resized :2 why this so and how can get 1 when i resize window only one time.
<script src="jquery-2.2.1.min.js">
</script>
<script>
var x=0;
$(document).ready(function()
{
$(window).resize(function()
{
$("span").text(x += 1);
});
});
</script>
</head>
<body>
<p>Window resized :<span></span></p>
</body>
</html>