Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 674 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 674 Bytes

domify

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:

http://jameswestgate.github.io/domify/test/