This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rendered_html = render('mytemplate', {}); | |
function render(tmpl_name, tmpl_data) { | |
if ( !render.tmpl_cache ) { | |
render.tmpl_cache = {}; | |
} | |
if ( ! render.tmpl_cache[tmpl_name] ) { | |
var tmpl_dir = '/static/templates'; | |
var tmpl_url = tmpl_dir + '/' + tmpl_name + '.html'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prop - transition, animation etc. | |
function featureDetect(prop) { | |
prop = prop.replace(/-(\w)/g, function (s, g) { | |
return g.toUpperCase() | |
}); | |
var pre = ',Icab,Khtml,Moz,Ms,O,Webkit'.split(','); | |
for (var i = 0; i < pre.length; ++i) { | |
if (i == 1) { | |
prop = prop.slice(0, 1).toUpperCase() + prop.slice(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**! | |
* Advanced jQuery Plugin Boilerplate | |
* @author: Cedric Ruiz | |
* https://github.com/elclanrs/advanced-jquery-boilerplate | |
*/ | |
(function($) { | |
var AP = Array.prototype; | |
$.newPlugin = function(pluginName, defaults, methods, global) { |
NewerOlder