ProLoser/AnythingSlider — Issue #214: Page Return Error
Author: lexicog
Created: 2011-11-17 03:09:45+00:00
State: open

I've written a short script that creates an alert when a certain slide is active. It works fine for the first slide (which it recognizes and displays as "Viewing Slide 1"), but then every other slide also pops up an alert that says "Viewing Slide 1" when it should not be popping up an alert at all. It seems that the script for returning the current page is not working properly. Any suggestions?

$(document).ready(function(){

var current = $('#slider').data('AnythingSlider').currentPage;

$(".arrow a").click(function (){

if (current == 1){

alert('Viewing Slide ' + current);

}

});

});