cyberdelia/django-pipeline — pull request #92 by tylerball (2012-03-27 15:25:56+00:00)
Title: Added modernizr tag

I'm not sure if this has a place in django-pipeline, but I frequently use [Modernizr's](http://www.modernizr.com/) load function to load in javascript asynchronously so I wrote a template tag for pipeline to be compatible with it's syntax. Here's some code I use to load jquery from CDN with a local fallback:

Modernizr.load({
load : {
'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js',
},
callback : {
'jquery' : function () {
if (!window.jQuery) Modernizr.load({
load : {
{% modernizr_js 'jquery-fallback-scripts' %}
}
});
}
}
})