Electron Jquery Issue


#1

Electron version: 1.0.0
Operating system: Description: Ubuntu 12.04 LTS ,Release: 12.04
Hello,

There is a problem with .hasClass() function, i want to store all div element using --var div = $(‘div’);
with this div object i want to get to play a video if its inside my “Encrypt” class, while on the same page i have the same video but i’ll play when we are inside “Decrypt” class so function are same ----
**function Pause() **
**{ **
if(div.hasClass(‘Encrypt’)){
myvideo1.pause();
}

** else**
** { myvideo2.pause(); }**
}

same source video but with different id in variable myvideo1 and myvideo2

but i am getting the following error
Uncaught TypeError: Cannot read property ‘hasClass’ of undefined


#2

That error message Uncaught TypeError: Cannot read property 'hasClass' of undefined is basically saying that your div variable is undefined. var div = $('div'); should have worked, and if I remember correct jquery should return an empty array even if the selector finds no items. So either we’re missing a huge chunk of code that explains why div is undefined or something else funny is happening.

Do you have a link to all of the code? Or at least this snippet in its entirety?