0

I am assisting with a non-profit WordPress site- http://ipaintmymind.org/ and there are a couple things broken with it. Foremost, a jQuery error is showing in the Console:

Uncaught TypeError: Object #<Object> has no method 'on' 

The source is here. But I'm not sure how that's being referenced. I thought it was the Jetpack module, so I disabled it but no change. I'm thinking this is related to the thumbnail href references of # in the navigation slider, but I'm not sure.

Please help!

Vishnu R
  • 1,859
  • 3
  • 26
  • 45
  • 1
    the page is using jquery 1.4.4, `.on()` was added in version 1.7, you can use `.delegate()` if you want to continue using the same version – Arun P Johny Aug 05 '13 at 05:19
  • Please post the code here. Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance. – John Dvorak Aug 05 '13 at 05:33

1 Answers1

1

Use delegate function like:

$( "#yourId" ).delegate( "click", function() {
   //your code
});

If you want to use on() then you have to add jQuery version 1.7 or greater

You can use wp_enque_script() to add the latest version of jQuery

user3723637
  • 130
  • 8
Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106