jQuery UI in a Firefox extension
Hi all,
maybe it's a question already asked in the past, but I haven't been able to find a solution.
I'm able to load in my Firefox extensions jQuery, but I cannot do the same with jQuery UI... I receive this error:
Error: TypeError: div is null
Source file: chrome://myext/jquery-1.5.2.js
Row: 5653
I'm loading it with the following code:
- loadLibraries: function(context) {
//load jQuery
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader);
loader.loadSubScript("chrome://myext/jquery-1.5.2.js",context);
var jQuery = window.jQuery.noConflict(true);
if( typeof(jQuery.fn._init) == 'undefined') { jQuery.fn._init = jQuery.fn.init; }
var $ = function(selector,context){ return new jQuery.fn.init(selector,context||myext.doc); };
$.fn = $.prototype = jQuery.fn;
myext.jQuery = jQuery;
myext.$ = $;
loader.loadSubScript("chrome://myext/jquery-ui-1.8.12.custom.min.js", jQuery);
loader.loadSubScript("chrome://myext/jquery.tipsy.js", jQuery);
}
This approach works for jQuery and also for tipsy plugin, but what can I do to allow also UI to work?
Thanks!