My favorites | Sign in
Project Home Source
Project Information
Members
Featured
Downloads
Links

A jQuery Template Plugin

$('.s1').tmp('<span>Template from static Html...</span>');

$('.s2').tmp({
	'html':'<span>Indexed div number <%=index%>...</span>',
	'contextData' : {
		'index': 1
	}
});

var _newSpan;

_newSpan = $('<span/>').html('From jQuery Object.'); 
$('.s3').tmp( _newSpan );

_newSpan = $('<span/>').html('Indexed with number <%=index++%> From jQuery Object.'); 
$('.s4').tmp({
	html:_newSpan,
	contextData:{index:0}
});

$(data).each(function(i,n){
	var _item = $('<div/>').tmp({url:'sample_simple_list.htm', contextData:n}).appendTo($('.s5'));
});

$('.s6').tmp({url:'sample_hover_click.htm'});

Download

Powered by Google Project Hosting