I use jquery-1.2.6 within my Firefox extensions and it works great. Some days ago i wanted to update to the current version of jquery (1.31) but this does not seem to work anymo
i found a solution for my problem!
I will present it here so that others can use this as a reference. After a lot of searching and tearing my hair i found this bug report on the jquery bug tracker. You can download jquery 1.3.1 Revision: 6161 there which fixes the problem (the official 1.3.1 release is Revision: 6158).
Another great trick a found out is including library's like jquery "on the fly" in firefox extensions. Just include the following within some javascript file within your extension:
var jsLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
jsLoader.loadSubScript("chrome://{appname}/content/jquery-1.3.1_6161.js");
jQuery.noConflict();
//use jquery
var doc = window.content.document;
alert(jQuery("body", doc).html());
Update: Today version 1.3.2 was released and the problem seems to be solved!
After window.content.document
I don't see the semicolon, I think it's necessary.