A jquery plug-in to encourage progressive enhancement of markup inside <noscript> tags. The <noscript> tags are replaced by document fragments which can be processed by a callback function before being added to the dom. Read the documentation here: https://github.com/jameswestgate/domify/wiki/API-Documentation
Usage:
<noscript>
<img src="/img/small-image.jpg"/>
</noscript>
$(document).ready(function(){
//Change image path before added to dom
$('noscript').domify(function() {
$(this).attr('src', '/img/large-image.jpg');
});
})
Unit tests: