I'm a bit lost with your suggestion here?
Are you saying I should add the lines:
self.items = jQuery("li", self);
self.items.not(":eq(0)").hide().end();
self.currentitem = 0;
into the replacecontents function?
Please advise.
Thanks.
On 27 Apr 2007, at 15:28, Dave Cardwell wrote:
djl wrote:
Hi there,
I've got a simple page that uses the newsticker plug-in (http://
www.texotela.co.uk/code/jquery/newsticker/), as follows:-
<snip>
The problem is clicking the 'Replace' button runs the
*replacecontents* function which updates the div contents with a
list, thus breaking the ticker effect as below:-
<snip>
If you look at the source of that plugin, it does some
initialisation when you call .newsTicker(). You should be able to
extrapolate from this what you need to do when you change the content.
Specifically the lines:
self.items = jQuery("li", self);
self.items.not(":eq(0)").hide().end();
self.currentitem = 0;
...where "self" is the news ticker <ul>. I believe (i.e. not
tested) that if you performed those three lines after the
replacement the ticker should continue to function.
Let us know how you get on.
--
Best wishes,
Dave Cardwell.
http://davecardwell.co.uk/javascript/jquery/