jquery的插件如何獲取對(duì)象的名字呢?html調(diào)用我是這樣寫的:插件我是這樣寫的:
3 回答

繁花如伊
TA貢獻(xiàn)2012條經(jīng)驗(yàn) 獲得超12個(gè)贊
(function ($) {
$.extend($.fn, {
drag: function (dragElement, isPaste, showMask) {
var ieVersion = (function () {
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}());
var $this = $(this).eq(0);
var $drg = $(dragElement).eq(0);
}

慕工程0101907
TA貢獻(xiàn)1887條經(jīng)驗(yàn) 獲得超5個(gè)贊
12345678 | // 我想你是想得到選擇器吧 alert($( 'aaa' ).selector); // 彈出aaa ( function ($){ $.fn.rolling = function () { alert( this .selector); }; }); |
- 3 回答
- 0 關(guān)注
- 1190 瀏覽
添加回答
舉報(bào)
0/150
提交
取消