First, I created a function that received a parameter and returned jQuery, for example:
function getjQuery(window)
{
(window);
return window.jQuery;
}
But then I received the email form, and I was told that I need to use the jQuery file with the original file name and be completely unmodified.
I started looking for an alternative and found this solution , but it does not work.
A jQuery object is being created, but I cannot find any elements. $("#id").lengthalways 0. With the previous method, it was always found.
My current code (which is not working)
AddonNameSpace.jQueryAux = jQuery;
AddonNameSpace.$ = function(selector,context) {
return
new AddonNameSpace.jQueryAux.fn.init(selector,context||contentWindow);
};
AddonNameSpace.$.fn =
AddonNameSpace.$.prototype = AddonNameSpace.jQueryAux.fn;
AddonNameSpace.jQuery = AddonNameSpace.$;
The jQuery file is loading on top of my overlay browser.xul:
<script type="text/javascript" src="chrome://addon/content/bin/jquery-1.5.2.min.js" />
Am I uploading to the right place?
How can I use jQuery to change the content on a page (HTML) with the jQuery source file, is this possible?