#Filler
Generates Client Side Text on the fly!
Filler.define('fruit' , {
list : [ 'apple' , 'orange' , 'watermelon']
});Filler.define('fruit'); // returns either apple, orange, watermelonFiller.define('fruit' , {
format : '%i {{0}}s'
}); // returns a number followed by a name of a fruit e.g. 7 apples| Symbol | Result |
|---|---|
| %s | One Letter from a-z |
| %5s | 5 Letters from a-z |
| %i | One Number from 0-9 |
| %3i | 3 Numbers from 0-9 |
| {{0}} | returns a value from the list property |
| {{<definition>}} | returns the result of the definition e.g {{fruit}} returns either apple , orange, watermelon |
Filler.define('fruit' , {
text : function() {
return "No Fruit Available";
}
}); // it always return "No Fruit Available"<div data-filler-fruit></div> <!-- Div will be populated with either apple, orange , watermelon -->
<div class="filler-fruit"></div> <!-- Div will also be populated with either apple, orange, watermelonFiller.undefine('fruit');