Carousel methods

init()init()

This method allows to initialize the carousel. It’s mainly used if you destroy() the instance. Otherwise, there isn’t any reason to init() the carousel since it’s automatically done by the plugin on load.

JS
Grid settings – JS field
wpgb.carousel.init();

destroy()destroy()

You can destroy the carousel instance at any time thanks to this method.

JS
Grid settings – JS field
wpgb.carousel.destroy();

resize()resize()

This method allows to resize the carousel.

JS
Grid settings – JS field
wpgb.carousel.resize();

next()next()

This method allows to go to the next carousel slide.

JS
Grid settings – JS field
wpgb.carousel.next();

previous()previous()

This method allows to go to the previous carousel slide.

JS
Grid settings – JS field
wpgb.carousel.previous();

select()select()

This method allows to select a slide and to scroll to it in the carousel.

ArgumentTypeDescription
indexintegerSlide index (0 index based)
JS
Grid settings – JS field
wpgb.carousel.select( 2 );