[jQuery] Re: Repeat a load

2007-09-11 Thread Klaus Hartl
Renaud wrote: $(document).ready(function() { myload(); }); In such a situation, when already having a perfect function reference you don't need another anonymous function...: $(document).ready(myload); or with the shorthand: $(myload); --Klaus

[jQuery] Re: Repeat a load

2007-09-11 Thread Renaud
> > Here are two methods, supposing you don't care how long it takes for > the .load(): (the syntax needs to be checked) > If you actually do, you can change the myload in the last exemple by: function myload() { $("#newsticker").empty().html($.get("test2.html", function() { count = setTimeout(m

[jQuery] Re: Repeat a load

2007-09-11 Thread Renaud
On 11 sep, 06:23, ned <[EMAIL PROTECTED]> wrote: > Hi to everybody, > I want to explain you "my little problem". > I have something like this: > > $("#newsticker").load("file.php"); > > This code is very simple and works well, but now I want to repeat the > file's load every 30 seconds until a tim

[jQuery] Re: Repeat a load

2007-09-11 Thread Glen Lipka
One idea: There is a pause plugin. http://blog.mythin.net/projects/jquery.php for (var x = 1; x <= 66; x++) { $("#newsticker").empty().load("file.php").pause(3); } Hmm, my demo isn't working with 1.2. It's complaining about the dequeue not working in the pause. This methodology mi