How to move to next slide programatically?

2019-08-02 05:00发布

问题:

I am using the following code to initialize the supersized plugin:

$.supersized({
    slides  :   [ 
        { image : '<?php bloginfo('template_directory'); ?>/bkg/1.jpg', title : 'Image Credit: Anna Tifu' },
        { image : '<?php bloginfo('template_directory'); ?>/bkg/3.jpg', title : 'Image Credit: Anna Tifu' },
        { image : '<?php bloginfo('template_directory'); ?>/bkg/3.jpg', title : 'Image Credit: Anna Tifu' }
    ]
});

How can I tell my menu to navigate next and prev?

Something like this?

$("a").click(function (e) {
    e.preventDefault();
    slides.next();
});

回答1:

See this: http://buildinternet.com/project/supersized/docs.html#api_docs

You have 2 methods namely nextSlide() and prevSlide()