Skip to content

Instantly share code, notes, and snippets.

View jdsharp's full-sized avatar

Jonathan Sharp jdsharp

  • Northern Wisconsin
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>jQuery Mockjax Example Query string</title>
<script src="../lib/jquery-1.4.2.js"></script>
<script src="../jquery.mockjax.js"></script>
<script>
$.mockjax({
url: '/rest',
data: { action: "foo" },
// Example of how to cache the result of an external jQuery Template.
// Inspired by this post...
// http://encosia.com/2010/10/05/using-external-templates-with-jquery-templates/
var person = {name: 'Dave'};
var person_tmpl;
$.get('_template.tpl.html', function(template) {
// Use converted string from remote file.