Created
December 13, 2010 05:19
-
-
Save quirkey/738686 to your computer and use it in GitHub Desktop.
the original sketch for sammy.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example app | |
(function($) { | |
get('#/path', function() { | |
this // == Request object | |
this.params //query string params as JS object | |
redirect('/path2'); //redirects | |
render('text'); //replaces specified area or body | |
}); | |
get('/path/:id', function(id) {}); // matches /:id and sends as arg to function | |
post('/path', function() {}); // all forms are disabled and submits are watched for and passed to post/put | |
clicked() // events are also bound | |
helpers(function() { | |
}); // methods are defined with in the apps namespace | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment