[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-30 Thread Sam Collett
On Apr 28, 2:38 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote: > Looking at the code for newticker, you might/should be able to just > recall $("ul").newsticker() and it should reset the ul. If for some > reason it doesn't work, then this might be the change that the plugin > needs: > stopTicke

[jQuery] Re: SPAM-LOW: [jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-28 Thread Dave Cardwell
djl wrote: 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. That is what I meant, yes - at the end of th

[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-28 Thread Sean Catchpole
Looking at the code for newticker, you might/should be able to just recall $("ul").newsticker() and it should reset the ul. If for some reason it doesn't work, then this might be the change that the plugin needs: stopTicker = function(el) { if(el.tickfn) clearInterval(el.tickfn); } ~Sean

[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-28 Thread djl
Thanks for your replies on this. I only just got around to trying out the suggestions to use jquery to update the div contents. Unfortunately, they don't seem to work and produce the same result as my initial code? There must be a way to do this. Any advice most appreciated. Thanks. On 27 A

[jQuery] Re: SPAM-LOW: [jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-28 Thread djl
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 w

[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-27 Thread Sam Collett
On Apr 27, 3:57 pm, "Fabyo Guimaraes" <[EMAIL PROTECTED]> wrote: > Use jquery = ) > > $(document).ready(function() { > $("#news").newsTicker();} > > ); > > function showdiv() { > $("#news").css("display", "block"); > > } > > function hidediv() { > $("#news").css("display", "none"); > >

[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-27 Thread Fabyo Guimaraes
Use jquery = ) $(document).ready(function() { $("#news").newsTicker(); } ); function showdiv() { $("#news").css("display", "block"); } function hidediv() { $("#news").css("display", "none"); } function replacecontents() { $("#news").html("Replaced 1Replaced 2Replaced 3Replaced 4");

[jQuery] Re: Replacing the contents of a div that uses newsticker plug-in

2007-04-27 Thread Dave Cardwell
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:- The problem is clicking the 'Replace' button runs the *replacecontents* function which updates the div contents with a list, thus breaking the ti