Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged template



« Prev 1 Next »
  1. FAV

    OOP Javascript Template with constructor and inheritance

    From @blixt http://stackoverflow.com/users/119081/blixt As you can see, the classes correctly interact with each other (they share the static id from MyClass, the announce method uses the correct get_name method, etc.) One thing to note is the...
    JavaScript saved by 2 people 7 views posted 5 years ago by rickygri
  2. FAV

    jQuery Plugin template

    Uses the object prototype to extend data. Instantiate as an object and use as specified below (bottom of the code)
    JavaScript 7 views posted 6 years ago by rickygri
  3. FAV

    Safe replace {{some_var}} in JS strings

    For those moments of weakness when .replace() looks like a good idea...
    JavaScript 3 views posted 7 years ago by inreflection7
  4. FAV

    Javascript Class Template

    jsHint happy class template for javascript
    JavaScript saved by 3 people 8 views posted 7 years ago by XtreamIT
  5. FAV

    My jQuery plugin start up

    JavaScript 2 views posted 8 years ago by digitalzoomstudio
  6. FAV

    CSS Base Reset and Typography

    JavaScript 3 views posted 8 years ago by sethetter
  7. FAV

    Javascript revealing module pattern template

    "Javascript module pattern emulates the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding/namespacing particular parts from the global scope." When inheritanc...
    JavaScript 3 views posted 8 years ago by coprolit
  8. FAV

    jquery templating

    Most of spservices function can be ignored -- not specifically relevant to templating. Important code in that block is the array push.
    JavaScript 2 views posted 8 years ago by rumremix
  9. FAV

    JS Object Tmplate

    JavaScript 0 views posted 8 years ago by loric
  10. FAV

    Page-like structured array to HTML

    All glory to the ml function.
    JavaScript 0 views posted 9 years ago by pablo_PXL
  11. FAV

    Mustache Sample Template

    JavaScript 0 views posted 9 years ago by mattneary
  12. FAV

    Simplest template engine

    *String template (String template, Object data)* Usage: template('Hello <b>${name}!</b> (not ${name}?)', { name: 'Gandalf' }) Result: Hello <b>Gandalf!</b> (not Gandalf?)
    JavaScript 2 views posted 9 years ago by emdin
  13. FAV

    Static and Instantiable Classes in JavaScript

    Simple template for setting up classes in JS
    JavaScript 0 views posted 9 years ago by geekyjohn
  14. FAV

    inline templating class for javascript

    I made this class because is was fed up with all those strings with escaped quotes with when building html into an output-string. You could also build a php-version of it.
    JavaScript 0 views posted 10 years ago by leonardreinders
  15. FAV

    RND - simple template for innerHTML

    Simple templating for innerHTML functions. Parses an input string (tmpl) for %(NAME) tokens, accepts an object (ns) as data and returns an output string.
    JavaScript saved by 2 people 0 views posted 13 years ago by mattgay
  16. FAV

    Template - New JavaScript File

    this is the template i mostly use when create new js files
    JavaScript saved by 4 people 0 views posted 13 years ago by alvaroisorna
« Prev 1 Next »