Hi,

I'm using gallery formatter in Drupal 7, and I'm wondering how I can trigger the gallery to show the next slide from a button defined in the body of the node.
I can click the button, and then nextButtonPressed is called, but should I write there?

For example:

function nextButtonPressed() { (function ($) { //I guess I have to call some galleryformatter.js function from this place, but I don't know how to do it. // Something like $('a.next-slide', $el).click(); ???? })(jQuery); }

Comments

manuel garcia’s picture

Out of the top of my head, I assume this is the code you could execute when someone clicks on your custom button:

$(".gallery-slides a.next-slide").trigger('click');

Which would be the same as someone clicking the next arrow on the slides... the module's js would do the rest.

If that doesnt help, try doing $('.gallery-thumbs').trigger('showNext');

Let me know if that helped.

astonvictor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks