0

Why am i getting " ReferenceError: $ is not defined at showRoom (:15:2) at HTMLAnchorElement.onclick (http://null.jsbin.com/runner:1:1450) " when I try using the function via onclick. The sound part works so the sound plays, but it does not change room and gives me this error.

var showRoom = function(room_id) {
    if(room_id == '#start'){
      soundIntro.play();

    }

    else {

      soundHadouken.play();

    }

$('.room').fadeOut();

$(room_id).fadeIn( "slow", function() {
    console.log('play music')
}); 

console.log('working');

}

0 Answers0