javascript - $ undefined error -


i'm developing chrome extension , i've got following...

 $(document).keypress(function(event){ resizedialogiframe(overlaydiv, iframe.contentwindow); }); 

but when executed i'm getting following error...

uncaught referenceerror: $ not defined

however, $('form[name="gs"]').attr('action'); working fine elsewhere in page.. what's going wrong?

if jquery loaded correctly (?) try pattern make sure $ references jquery object.

(function($) {      $(function() {          $(document).keypress(function(event){ resizedialogiframe(overlaydiv, iframe.contentwindow); });      }); }(jquery)); 

if doesn't help, check if jquery loaded correctly. thatfore, call

alert('jquery' in window); 

if alerts false, wrong.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -