$.fn
Zepto.fn
is an object that holds all of the methods that are available on
Zepto collections, such as addClass()
, attr()
, and
other. Adding a function to this object makes that method available on every
Zepto collection.
Here's an example implementation of Zepto's empty()
method:
$.fn.empty = function(){
return this.each(function(){ this.innerHTML = '' })
}