JavaScipt Code not working

Dear bb-theme

I put the following code snippet into “Code” --> “JavaSript”:

if(event.keyCode == 13){

Unfortunately it does not work. The browsers javasript console tells me:
Uncaught TypeError: $ is not a function

Do you have any idea what i’m doing wrong?

Thanks for helping.

Hey Dominic,

That’s because the jQuery that comes with WP is in compatibility mode where $ won’t work so it doesn’t conflict with any other libraries using the same sign as well. You can change all instances of $ to jQuery and that should work. You can check the link below for more info. :slight_smile: