[jQuery] Re: running an onload code snippet only once

2009-12-16 Thread Richard KLINDA
No, I mean I now use window.onload as a workaround (instead of $(function(){})), it fires only once of course, but I did not like it because I can only use it once in the code. I did not know about $(window).load(func), thats very nice, thanks. Regarding 'Re: running an onload code snippet only

Re: [jQuery] Re: running an onload code snippet only once

2009-12-16 Thread Juan Ignacio Borda
try using: $(document).ready(function(){ ...your code here }); this is the JQuery way Original Message Those events window.onload, in jQuery, that would be $(window).load (...), should *not* be firing at any time other than when the document loads the first time...

Re: [jQuery] Re: running an onload code snippet only once

2009-12-16 Thread Michael Geary
$(document).ready( function() {} ) and $( function() {} ) are the same thing. The latter is just a shortcut to the former. If one is acting oddly, chances are that the other will too. Richard, $( function() {} ) should *never* call your function more than once. It definitely shouldn't call it

[jQuery] Re: running an onload code snippet only once

2009-12-15 Thread MorningZ
Those events window.onload, in jQuery, that would be $(window).load (...), should *not* be firing at any time other than when the document loads the first time... something else has to be going on with your code to fire off that code again On Dec 15, 3:27 pm, Richard KLINDA rkli...@gmail.com