Skip to main content

$ is not a function in WordPress

When building your own theme in WordPress, using Jquery with $ might cause issues. To fix this wrap your code in this:


  // Use can use $ instead of jQuery in here



  //you can now use $ as your jQuery object.
  var body = $( 'body' );

Leave a Reply