iosscripts / iosslider

iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
http://iosscripts.com/iosslider
432 stars 103 forks source link

Dynamically passing value into goToSlide from the index value of an array #329

Closed jamjia closed 10 years ago

jamjia commented 10 years ago

Hi there,

I want to create a bunch of shortcuts using a anchor tag but give it a class of "shortcut". I then want to loop through these with the jQuery each method and then binding each to a click event. So that on click, I will then trigger the goToSlide by passing the index value +1 to the slideNum. Here's my code, below. The problem is that I'm constantly getting a TypeError: undefined is not a function could someone help me work out where I'm going wrong???

    $('.shortcut').each(function() { 
        $(this).bind('click', function(){
            var slideNum = $(this).index()+1;
            $('.slideshow').iosSlide("goToSlide", slideNum);
            console.log(slideNum);
        });
    });
marcwhitbread commented 10 years ago

Missing an "r" in the plugin name "iosSlider".

jamjia commented 10 years ago

@marcwhitbread thank you!