Question

Located in a php page is the following code:

$(function() {
    $(".scrollable").scrollable({ items: "li", circular: true, mousewheel: false, next: ".next", prev: ".prev" }).autoscroll({autoplay: true, interval: 100});
});

This small slideshow is supposed to be able to scroll(rotate) images from left to right when the page loads. I don't know much about php, but shouldn't this code be enough to make the slideshow move on its own? (It does move when the user clicks on the left and right buttons)

If there is a better, faster, easier way to do this, I would really like some advice here. I have tried looking around, but any code that I find seems too complicated for this small of a task.

EDIT: I didn't create the page, so I don't know what this function is from. I'm looking in all the pages this is included in to see if I can find out where the javascript/jquery is being called.

ANSWER: The calls to the jquery were on another page that I had to find. But yeah, that was the problem! There was only one line of jquery that was called, not the 2 that were mentioned in the answer I chose. :/ Looks like someone started the pages, but never finished them.

Était-ce utile?

La solution

You need some CSS + jQuery + jQuery TOOLS plugin extension.

Just like this: http://jsbin.com/oviqap/1/edit

See http://jquerytools.org/demos/scrollable/index.html for further details

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top