Loading ...

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

Who is online?  0 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

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

Posted: 5/25/2010

Lurker 235  points  Lurker
  • Joined on: 10/16/2009
  • Posts: 47

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.


Posted: 5/26/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
  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];


Page 1 of 1 (2 items)