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> wrote: > Hello, what is a good way to run a code snippet after the page is > loaded, but only just one time? > > I use the ready event $(function(){...}); most of the time, but > sometimes it fires multiple times (when the DOM changes I think), and > rarely there are stuff that I only want to run JUST ONCE per pageload. > > What is a good way to achieve that? > > Now I do window.onload = function() {...}, but I hope there is something > better. > > Thanks in advance... > > -- > Richard