Get stuck


#1

My code seems to be ok..

var main = function() {
  $(document).keypress(function() {
		$('.btn').toggleClass('btn-like');

  });
};

$(document).ready(main);

https://www.codecademy.com/skills/make-an-interactive-website/topics/jquery-events/jquery-keypress-try


#2

Your code is correct... Select the area next to the code window, and then press Enter. You will see the button change from transparent to blue. At least, I did...using your code. The window (that says "JavaScript and JQuery") does need to be selected first, though. Just click your mouse on it or something before performing tests.


#3

Thx I only clicked on the window and I was expecting to vanish the button :grinning: