jquery的插件如何获取对象的名字呢?html调用我是这样写的:插件我是这样写的:
3 回答
繁花如伊
TA贡献2012条经验 获得超12个赞
(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贡献1887条经验 获得超5个赞
| 12345678 | // 我想你是想得到选择器吧alert($('aaa').selector); // 弹出aaa (function($){ $.fn.rolling = function () { alert(this.selector); };}); |
- 3 回答
- 0 关注
- 1254 浏览
添加回答
举报
0/150
提交
取消
