i just found jcov开发者_StackOverflowerflip it's a great script but i'd like to customise it. instead of this scrollbar i'd like to use simple left/right arrows what function do i have to call? i found functions called next and previous but i don't know how to call them properly. the js is here -> http://www.jcoverflip.com/files/docs/jcoverflip-demo/jquery.jcoverflip.js and this is how i wanted to call this:
<script type="text/javascript">
$(document).ready(function() {
$('left').click(function() {
this.previous();
//this.previous();
} );
});
what am i doing wrong?
Try the following:
$('.left').click(function() {
var i = $('#flip').jcoverflip("next");
i.next();
});
$('.right').click(function () {
var i = $('#flip').jcoverflip("previous");
i.next();
});
Assuming the buttons you are targeting use the classes 'left' and 'right'.
精彩评论