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
Post a Comment