I'm pretty new to javascript. I'm having trouble initializing multiple instances of a slider script. I want 1 slider initialized for each div with class "horizontalSlider" by giving the script that div's id so that each instance is unique.
Here's what I have so far but it is not working.
$(document).ready(function(){
$('.horizontalSlider').each(function(){
var thisSlider = '"#' + $(this).attr("id") + ' ul"';
$(thisSlider).bxSlider({
mode : 'horizontal',
speed : 500,
prevImage : 'prev.svg',
nextImage : 'next.svg',
easing : 'swing'
});
});
});