Override default jQuery selector context

后端 未结 3 904
野趣味
野趣味 2020-12-09 17:10

I\'m trying to use jQuery inside a Firefox extension, and actually want to use jQuery to manipulate the DOM of the current page, as opposed to the context of the XUL file. T

3条回答
  •  孤城傲影
    2020-12-09 17:50

    var jQueryInit = $.fn.init;
    
    $.fn.init = function(arg1, arg2, rootjQuery){
        arg2 = arg2 || window.document;
        return new jQueryInit(arg1, arg2, rootjQuery);
    };
    

提交回复
热议问题