Skip to content
This repository was archived by the owner on May 22, 2019. It is now read-only.

Many clicks on the same page result in a bug in jQuery fadeIn / fadeOut #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions jquery.blueberry.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
//rotate to selected slide on pager click
if(pager){
$('a', pager).click(function() {

// stop transition when user click at the same page
var idx = $('.pager li a').index(this);
if (idx == current) {
return false;
}

//stop the timer
clearTimeout(obj.play);
//set the slide index based on pager index
Expand Down Expand Up @@ -144,33 +151,33 @@
//bind setsize function to window resize event
$(window).resize(function(){
setsize();
});

});


//Add keyboard navigation
//Add keyboard navigation

if(o.keynav){
$(document).keyup(function(e){
$(document).keyup(function(e){

switch (e.which) {
switch (e.which) {

case 39: case 32: //right arrow & space
case 39: case 32: //right arrow & space

clearTimeout(obj.play);
clearTimeout(obj.play);

rotate();
rotate();

break;
break;


case 37: // left arrow
clearTimeout(obj.play);
next = current - 1;
rotate();
rotate();

break;
}
}

});
}
Expand Down