Error: Cannot read property 'classList' of undefined

Error: Cannot read property 'classList' of undefined

  

I tried to get list of data from web service. When i tried to access it from emulator, this error shows. Could someone explain to me the cause of this error?

Solution

Hi Alfred,

You are call the property "classList", the object is not avaliable, try to see object is avaliable the time of call, sometimes the object is called before page load,

so try to call after document ready.

Thanks,

Balu

Solution