richardscarrott / jquery-ui-carousel

jQuery RS Carousel is a responsive and touch-enabled carousel written on top of jQuery and the jQuery UI Widget Factory providing a full and familiar API in less than 2.6kB minified and gzipped.
http://richardscarrott.github.io/jquery-ui-carousel/
192 stars 56 forks source link

Move next/previous buttons. #28

Closed dannyfritz closed 12 years ago

dannyfritz commented 12 years ago

It would be nice to decouple the next/previous buttons from the carousel. Or at the very least, I'm having trouble moving the buttons above the gallery. Any help appreciated.

richardscarrott commented 12 years ago

You can override their location in the DOM with the 'insertNextAction' and 'insertPrevAction' options like this:

$('.rs-carousel').carousel({
    insertNextAction: function () {
        // this is === the '.rs-carousel-action-next' anchor element
        $(this).prependTo('.rs-carousel');
    }
});

This can also be done with the pagination using 'insertPagination'