h***@qq.com
h***@qq.com
  • 发布:2017-01-11 19:49
  • 更新:2017-01-11 19:49
  • 阅读:2184

mui扩展使用

分类:MUI

(function($) {

var getzeptoapi={
addClass:Zepto.fn.addClass,
removeClass:Zepto.fn.removeClass,
remove:Zepto.fn.remove,
width:Zepto.fn.width,
height:Zepto.fn.height,
attr:Zepto.fn.attr,
removeAttr:Zepto.fn.removeAttr,
show:Zepto.fn.show,
hide:Zepto.fn.hide,
find:Zepto.fn.find,
siblings:Zepto.fn.siblings,
parent:Zepto.fn.parent,
pluck:Zepto.fn.pluck,
hasClass:Zepto.fn.hasClass,
append:Zepto.fn.append,
parents:Zepto.fn.parents,
toggle:Zepto.fn.toggle,
prev:Zepto.fn.prev,
next:Zepto.fn.next,
html:Zepto.fn.html,
text:Zepto.fn.text,
prop:Zepto.fn.prop,
val:Zepto.fn.val,
offset:Zepto.fn.offset,
css:Zepto.fn.css,
index:Zepto.fn.index,
click:Zepto.fn.click,
eq:function(i){ var el = this[i]
return el && !typeof(el)=='Object' ? el : $(el)},
first:Zepto.fn.first,
last:Zepto.fn.last,
data:Zepto.fn.data,
map:Zepto.fn.map,
index:Zepto.fn.index,
toggleClass:Zepto.fn.toggleClass,
position:Zepto.fn.position,
css:Zepto.fn.css,
isHref:function (){
var item=this
href=item.href||$(this).attr('href');
if(href!=""&&href.indexOf('javascript')==-1){
return href

    }else{  
        return false  
    }  
}  

}
$.fn=$.extend(getzeptoapi,$.fn)

})(mui);

2017-01-11 19:49 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复