Skip to content

jameswestgate/domify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

A jquery plug-in to manage dom elements inside <noscript> tags

Resources

License

Stars

Watchers

Forks

Packages

No packages published