Hi
The 2nd time I click, the function repeats twice, the 3rd time I click, the function repeats thrice... like a loop depends on my clicks. what is the problem, is it a bug of jquery or a bug of mine. Thanks in advance.
Cheers
<!--============-->
<head>
<script src="jQuery.js" type="text/javascript"></script>
<script>
var i=1;
$(document).ready(function()
{
$('li').click(function()
{
alert('this:'+i);
$('li').click(function(){
i++;
alert(i);
})
})
})
</script>
</head>
<body>
<li>test</li>
</body>
</html>