I'm having a problem in letting 'setinterval' function to work in 'click' event. it doesn't work at all inside the click event, while if i put it out side the click event it works.. how can i get around this ??
I googled it for a solution, but it seems there is already an issue with it with the 'click' event.. & i hope you can help me guys with it..
thanks.
function myTimer() {
alert("test");
};
$(document).ready(function() {
$('#testButton').click(function() {
var myVar = setInterval(function() {
myTimer();
}, 1000);
});
});
Sorry Guys... it seems that I was having an error on my side.. I put the input button to be runat server & this is was the problem... thank u guys for ur help.. and sorry for this problem ...