Changeset 29938

Show
Ignore:
Timestamp:
30.05.2015 11:09:41 (5 years ago)
Author:
davidb
Message:

Changes to allow the drum image to be visually animated when hit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/respooled/collect/popup-video-respooled/js/jquery-drums.js

    r29867 r29938  
    3232     
    3333    if (drum.ended) { 
     34        $(this).addClass('hit'); 
    3435        drum.play(); 
    3536    } else { 
     
    3940        console.log("Error thrown when playing drum sound: " + e); 
    4041        } 
     42        $(this).addClass('hit'); 
    4143            drum.play(); 
    4244        } 
    4345    });     
     46 
     47    $('.drum').mouseup(function() { 
     48    $(this).removeClass('hit'); 
     49    }); 
     50 
    4451});