bind(type, callback)


Version: Pro

bind(type, callback)

returns Evo Slider

Binds a callback function to an Evo Slider event. In the callback, the this keyword inside the callback always refers to the same slider scope. That's mean you can access the API methods using the this keyword.

Example:

<script type="text/javascript">
    var myEvoSlider = $("#mySlider").evoSlider();
    
    // Bind function to the onplay event
    myEvoSlider.bind("onplay", function(){
        var i = this.getIndex();
        alert("Evo Slider start playing on slide " + i);
    });
</script>