I have a issue whereby I need to move to the next slide in the slideshow using a custom jquery script without modifying the exiting codebase.
It is possible to call/trigger the next slide in the slideshow? and if so could someone please provide the method that we should be calling to achieve this?
Many thanks
You have to use jQuery to modify the bullet point slide change items. What I did was I used jQuery to find the bullet points, and then change them to text links that appear below the slider. You can obviously use anything (images ,etc). The key is that it has to be done this way because Mega Slider has its own jQuery that calls the slide change function (something I didnt want to edit).
Heres my code below, I put it on the page template where the slider appears. My code pulls the ALT tag of the slide background image and uses it as a text link instead of those bullet points. i then used CSS to re-position where the links appear (I wont post that because thats somewhat easier) :
jQuery(window).load(function($) {
jQuery(".md-slide-item").each(function() {
var altname = jQuery(this).data('thumb-alt');
var slidernum = jQuery(this).attr('class').match(/ slide-(\d*)/)[1];
slidernum = slidernum - 1;
if (altname != 'first') {
altnav = altname;
} else {
altnav = 'Slide ' + slidernum;
}
jQuery('.md-bullet[rel="' + slidernum + '"]').html('<a class="custom-slider-bullet">' + altnav + '</a>');
});
});
Hi,
Can you please tell us which version of your slider?