[jQuery] Re: Why is this simple thing not working..??

2008-06-01 Thread Peter
Hi Mark, You don't need to wrap the hover function in an object. Instead you can use the hover function itself to store the static variable. In that case you don't need to set timeoutRunning before the first call as it is == undefined then. I did a counter: function hover2() { if

[jQuery] Re: Why is this simple thing not working..??

2008-06-01 Thread Mark
2008/6/1 Peter [EMAIL PROTECTED]: Hi Mark, You don't need to wrap the hover function in an object. Instead you can use the hover function itself to store the static variable. In that case you don't need to set timeoutRunning before the first call as it is == undefined then. I did a

[jQuery] Re: Why is this simple thing not working..??

2008-05-31 Thread Mark
Got it working with this: function Hovertest() { this.timeoutRunning = false; this.hover = function() { if (!this.timeoutRunning) { this.timeoutRunning = true; alert('true...'); } else { alert('JEAAA FALSE');