New features added to news ticker plugin
I’ve just released a new (beta) version of my news ticker plugin. It adds two commonly-requested features:
- An option to resume the animation on mouseOut (“resumeOffHover” setting)
- Support for attributes on links within the news item list - any attributes added to an anchor will be carried through.
Version 2.3.1-beta can be downloaded from the jQuery plugin page. The documentation contains notes on the functionality.
Comments (11 so far)
If you add the following to line 239 it will allow you to set an additional “resume delay” after the resumeOffhover function.
Change:
if (settings.resumeOffHover) { // only allowed if stopOnHover enabled
tickerElement.bind({
mouseout: function(event) {
tickerData = tickerElement.data(name);
if (!tickerData.animating) { // if already animating, don’t start animating again
$(tickerData.newsList).trigger(“resume”);
if (debugMode) {
console.log(‘resumeoffhover’ + tickerData.currentItem + ’ ’ + tickerData.animating);
}
}
}
});
}
}
To:
if (settings.resumeOffHover) { // only allowed if stopOnHover enabled
tickerElement.bind({
mouseout: function(event) {
tickerData = tickerElement.data(name);
if (!tickerData.animating) { // if already animating, don’t start animating again
setTimeout(function() {
$(tickerData.newsList).trigger(“resume”);
}, 700);
//$(tickerData.newsList).trigger(“resume”);
if (debugMode) {
console.log(‘resumeoffhover’ + tickerData.currentItem + ’ ’ + tickerData.animating);
}
}
}
});
}
}
you could further develop this to be an additional variable in the global settings.
Hello Bryan,
I’m trying to add your BBC-style scroller to our institutional homepage. I followed your instructions and used your code to parse and display entries from our rss feed (http://www.norwich.edu/news.xml).
It’s working well in Firefox, but not in IE7. Is there additional code required for IE…something to do with ActiveX?
Any help would be greatly appreciated. I love the way your ticker displays, and beings able to use our rss feed to populate the ticker would save our web editor an extra step.
best,
Eric
Hello again Bryan,
The working example is located here:
http://www.norwich.edu/indexVIDEO.html
Thanks again,
Eric
Hi Eric,
There seems to have been a bug relating to IE 6/7. Another user reported is and supplied a fix, which is now implemented in version 2.3.3.
I don’t have ready access to IE just now but if you’d like to download that new version from http://plugins.jquery.com/project/BBCnewsTicker and give that a go, hopefully it’ll solve your problem. Do let me know how you get on - and if there’s still an issue I’ll be happy to take a look.
Best wishes,
Bryan
Hi,
I’ve found that version 2.3.4 doesn’t seem to include the URLs properly - instead of linking to the news item the <a> tag looks something like: <a href=”[object Object]”>
I’ve tried with various versions of jQuery, same problem with each. I’ve reverted back to v2.2 of your script.
Great work by the way, just what I was looking for!
I have configured version 2.3.4 and set stopOnHover: true. Mouseover and Out function are triggering over the whole container. whereas it should be triggered only when we move mouse over the scrolling text. Need your help to sort it out.
Thanks,
Hi there,
You’ll want the latest release 2.3.6 - it should sort that bug out, sorry about that. http://plugins.jquery.com/project/BBCnewsTicker
Bryan
Hi Malik,
That’s actually intended functionality, because when using the hover to stop/resume, you’d tend to get jittery behaviour if the trigger isn’t triggered by hover over/out of the ticker container rather than on links with display:inline;
You’d need to adjust the tickerElement.bind() lines to change this to bind to the links themselves, but because I’ve not found that to work reliably cross-browser, it’s not functionality I’d want to build into the ticker.
I would recommend that you size the ul and style it to make the space it takes up clearly part of the ticker to help give users the right expectations.
Sorry if that’s not quite the answer you were looking for, but I hope you see the reasoning behind it.
Incidentally, there’s a release 2.3.6 (just released) which fixes an unrelated bug in 2.3.4 - you’ll need to update as 2.3.4 won’t work properly.
Best,
Bryan
Hi Bryan,
With version 2.3.6, The ticker is not properly functioning with Mozilla FireFox. It cannot control the tickerRate when the Mouse Out event triggers. I have set the tickerRate to 50. so i have to revert back to version 2.3.4.
Thanks for your prompt reply.
Malik
Hi Malik,I’ve taken a *really* quick peek (off to work in a sec!) since I’ve not seen issues with that. Seemed ok for me. Try it at e.g. 80 and compare with 200… Maybe there is some side effect with fast rates, though a quick test at 20 seemed ok.Will look properly later, but definitely don’t use 2.3.4 as the links won’t work (oops!) Can you clarify the detail of the problem you were seeing to help me investigate?BestBryan
I need right to left news ticker(BBC news ticker if it exists). who can help me?
Post new comment