Last active
January 31, 2017 17:45
-
-
Save Kasst1el/a39edd8bd29bff380697bee60e1fe83b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stock_count = 2; | |
$(function(){ | |
$(".wrap_gallery").swipe({ | |
tap:function(){ | |
$("#g_" + stock_count).css("opacity","0"); | |
if(stock_count == 3){ | |
stock_count = 0; | |
} else { | |
////////// | |
} | |
$("#g_" + (stock_count+1)).css("opacity","1"); | |
stock_count++; | |
} | |
}); | |
}); | |
$("#stock_right").click(function(){ | |
$("#g_" + stock_count).css("opacity","0"); | |
if(stock_count == 3){ | |
stock_count = 0; | |
} | |
$("#g_" + (stock_count+1)).css("opacity","1"); | |
stock_count++; | |
}); | |
$("#stock_left").click(function(){ | |
$("#g_" + stock_count).css("opacity","0"); | |
if(stock_count == 1){ | |
stock_count = 4; | |
} | |
$("#g_" + (stock_count-1)).css("opacity","1"); | |
stock_count--; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment