ep.fn
Categories: Core
ep.fn
Plugin: ep.core
Description: Stack of available methods and properties in the ep API.
-
ep.fn
version added: 6.11.0
The ep.fn
property provides all prototype methods and properties of the ep API.
The ep API based on the jQuery API, so the ep.fn
property includes all methods and properties of jQuery API.
-
Add a method to the ep API.
HTML:
<div class="bar"></div> <div class="bar"></div> <div class="bar"></div>
Code:
ep.fn.foo = function(){ return this.each(function(){ $(this).addClass('foo'); }); } // execute the new method on the ep API ep('#bar').foo()
Results:
<div class="bar foo"></div> <div class="bar foo"></div> <div class="bar foo"></div>