Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var hand1 = document.getElementById("hand1");
- var hand2 = document.getElementById("hand2");
- var hand3 = document.getElementById("hand3");
- var hand4 = document.getElementById("hand4");
- var handcount = 0
- $(".hand").click(function() {
- handcount++;
- if(handcount == 1) {
- $(".hand1").addClass("hide");
- hand1.pause();
- hand1.currentTime = '0';
- $(".hand2").get(0).play();
- $(".hand2").removeClass("hide");
- }else if(handcount == 2){
- $(".hand2").addClass("hide");
- hand2.pause();
- hand2.currentTime = '0';
- $(".hand3").get(0).play();
- $(".hand3").removeClass("hide");
- }else if(handcount == 3){
- $(".hand3").addClass("hide");
- hand3.pause();
- hand3.currentTime = '0';
- $(".hand4").get(0).play();
- $(".hand4").removeClass("hide");
- }else if(handcount == 4){
- $(".hand4").addClass("hide");
- hand4.pause();
- hand4.currentTime = '0';
- $(".hand1").get(0).play();
- $(".hand1").removeClass("hide");
- handcount = 0;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement