jQuery in Opera User JS Doesn't Work

Posted by Axonn on Stack Overflow See other posts from Stack Overflow or by Axonn
Published on 2010-05-14T01:29:46Z Indexed on 2010/05/14 1:34 UTC
Read the original article Hit count: 377

Filed under:
|

Hello ::- ). I'm playing with some Opera User JS. I included "1jquery.min.js" in my User JS folder (1 in front because Opera loads them alphabetically). Unfortunately, it doesn't appear to be working.

window.onload = OnWindowLoad;

$(document).ready(function()
{
  alert ($('#area_19'));
});

function OnWindowLoad ()
{
  alert ($('#area_19'));
  alert(document.getElementById("area_19"));
}

What's interesting about this code is that the first two alerts come back in NULL, but the last one does find the object! So the element definitely exists in the page, but my jQuery seems unable to get it. What's even stranger is that the jQuery "ready" function works, indicating that I do have jQuery capability.

I'm quite puzzled about all this ::- /. Hopefully somebody can give me a clue ::- ).

© Stack Overflow or respective owner

Related posts about opera

Related posts about JavaScript