Who is online?  87 guests and 0 members
home »forums »asp.net topics »web forms / data controls »'undefined' is null or not an object in jquery 1.4.2

'undefined' is null or not an object in jquery 1.4.2

Topic RSS Feed

Posts under the topic: 'undefined' is null or not an object in jquery 1.4.2

Posted: 5/25/2010 11:07:26 AM

Lurker 230  points  Lurker
  • Joined on: 10/16/2009 1:00:00 PM
  • Posts: 46

Hi experts,

 

I am using jquery 1.4.2 version file  . In IE 8 I am recieving this error 'undefined' is null or not an object. I tried to debug the file and found Line 1920 is causing the issue :

var events = jQuery.data(this, "events"), handlers = events[event.type];

here events is coming undefined . Please help me how can I fix this.


jquery

Posted: 5/26/2010 6:58:39 PM

Professional 10058  points  Professional
  • Joined on: 4/19/2009 1:46:52 AM
  • Posts: 238
answered  Answered

kevin said:

var events = jQuery.data(this, "events"), handlers = events[event.type];

Change that to: 

var events = jQuery.data(this, "events") || {}, handlers = events[event.type];


jquery
Page 1 of 1 (2 items)