Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using jQ's load to insert jQote2 templates remotely
<!Doctype html>
<HTML>
<HEAD>
<script src="jQuery-1.5.1.min.js" ></script>
<script src="jQuery.jQote2.min.js" ></script>
<script type="text/javascript">
j$ = jQuery.noConflict();
j$(document).ready(
function() {
j$('#contacts_tmpl').load('test_template.js', function() {
j$('#contactList').jqoteapp('#contacts_tmpl', [{"Name":"Test","Id":"asdasad"},{"Name":"Test2","Id":"asssffff"}]);
});
}
);
</script>
</HEAD>
<BODY>
<ul id="contactList">
<script type="text/x-jqote-template" id="contacts_tmpl" ></script>
</ul>
</BODY>
</HTML>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment