forked from subtleGradient/slick
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathSly.Custom-min.js
2 lines (2 loc) · 1.55 KB
/
Sly.Custom-min.js
1
2
/* Sly v1.0rc2 <http://sly.digitarald.com> - (C) 2009 Harald Kirschner <http://digitarald.de> - Open source under MIT License */
Sly.implement("combinators",{"<":function(c,b,a,e,d){while((b=b.parentNode)&&b.nodeType!==9){if(d(b)&&a.match(b,e)){c.push(b)}}return c},"^":function(c,b,a,e,d){if((b=b.firstChild)){if(node.nodeType===1&&d(b)&&a.match(b,e)){c.push(b)}else{c=Sly.combinators["+"](c,b,a,b,e)}}return c},"++":function(c,b,a,e,d){while((b=b.nextSibling)){if(b.nodeType===1&&d(b)&&this.match(b,e)){c.push(b)}}return c},"--":function(c,b,a,e,d){while((b=b.previousSibling)){if(b.nodeType===1&&d(b)&&this.match(b,e)){c.push(b)}}return c}});Sly.implement("pseudos",{root:function(a){return(a.parentNode==a.ownerDocument)},target:function(a){var b=location.hash;return(a.id&&b&&a.id==b.slice(1))},"only-child":function(a,c,b){return(Sly.pseudos["first-child"](a,null,b)&&Sly.pseudos["last-child"](a,null,b))},hidden:function(a){return(!a.offsetWidth&&!a.offsetHeight)},visible:function(a){return(a.offsetWidth||a.offsetHeight)},has:function(b,a){return Sly.find(a,b)},disabled:function(a){return(a.disabled==true)},enabled:function(a){return(a.disabled==false&&a.type!="hidden")},selected:function(a){return(a.selected!=false)},checked:function(a){return(a.checked==true||a.selected==true)},input:function(a){return(a.type)},radio:function(a){return(a.type=="radio")},checkbox:function(a){return(a.type=="checkbox")},text:function(a){return(a.type=="text")},header:function(a){return((/^h\d$/i).test(a.tagName))}});Sly.implement("operators",{"/=":function(a,b){return a}});Sly.recompile();