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
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...
$(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
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
4 matches
Mail list logo