Hey I"m trying to make an auto scrolling newsticker.
I can't tell by the documentation on the website for this because their examples are so basic, but is this code syntactically correct?
jquery_plugin_add('scrollable');
drupal_add_js ('$(document).ready(function() {
$("#block-aggregator-feed-2").scrollable({
circular: true,
easing:"linear",
speed:500,
})
.autoscroll({
autoplay: true,
step:2,
interval:2000,
});
','inline');
It's the best I can do, looking at examples on the site. I think I need to add another selector in somehow to grab the LI tag that is inside the block aggregator block but I'm not sure how to add it. I think I need to make it select the class .item-list since that is directly around the li tag, but again not sure how to do this. Any help would be great.
Becky
Comments
Comment #1
beckyjohnson commentedI tried this just now too, switching over to a views block I made:
$(document).ready(function() { // initialize scrollable $("span.field-content").scrollable({ loop: true, speed: 200, clickable: false, scroll: 2, vertical: true, size: 1, circular: true, easing:"linear", .autoscroll({ autoplay: true, step:2, interval:2000, }); }); });jquery_plugin_add('scrollable');Is the syntax correct?