jQuery 1.8.1 fails with firefox 14 with error "d is undefined"
I am writing a firefox plugin and am intending to use jQuery in it.
From the overlay, I am calling my javascript which has the page load listener in it. I am loading jquery once the page load is triggered.
//code snippet
window.addEventListener("load", function pageLoader(evt){
window.removeEventListener("load", pageLoader, false);
var jsLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
jsLoader.loadSubScript("chrome://content/plugin/jquery-1.8.1.min.js");
alert('jQuery loaded');
$ = window.$;
//end
The alert never comes as its throwing an error while loading jQuery with error "a is undefined". I tried using the uncompressed version and the error remains, though it says "d is undefined".
After searching somemore, I found somebody has succeeded with an older version of jQuery 1.4.2. I tried that and jQuery loaded without any issues. But, I ran into issues there as well while trying to access any of the DOM elements.
Not sure what I am doing wrong in loading jQuery. Can somebody help me with this?