Skip to content

Instantly share code, notes, and snippets.

<<<<<<< HEAD
=======
>>>>>>> 39d7104023dd06ff8515885ce9ece055c601952d
@mtrpcic
mtrpcic / examples.js
Created February 3, 2012 01:00
examples
// extensions.js
$.fn.uploader = function(element){
Uploader.show(element);
}
// functions.js
var Uploader = {
"show": function(element){
// code here to show the uploader
},
@mtrpcic
mtrpcic / Testcase.html
Created December 27, 2011 23:41
Code examples for Issue #13 on mtrpcic/pathjs
/*
The following is a concise outline of the test environment that I've set up to test the outcome described in
Issue #13 on the PathJS master branch. This setup is running on a Rails server.
https://github.com/mtrpcic/pathjs/issues/13
*/
// Step 1 - Server, Routes, and Data
// I set up a Rails 3.1.0 server with a 'Widget' model, and the following test route:
@mtrpcic
mtrpcic / gist:1109398
Created July 27, 2011 13:51
HTML5 Fallback Ideas
// PathJS supports both the Hashtag and HTML5 History API now. Some users would like it to automatically fall back to the Hashtag if
// the history API is not supported. Obviously, this can't be the default, as some users want the site to work in browsers with JavaScript
// turned off, and will only use the History API to add transitions and effects to their site.
//
// When using the Hashtag implementation, users must define their routes, and then make sure that they tell PathJS to listen for state changes
// by calling the appropriate method:
Path.listen();
// The `Path.listen()` method is not required when doing HTML5 History API calls, as we have a wrapper method that wraps the native
/*
---------
Copyright 2011, ZangZing LLC. All rights reserved.
*/
function ZZA(c, a, b) {
this.id = c;
this.zzv_id = null;
this.usertype = (this.useridentifier = a) ? 1 : 2;
if (b == undefined) b = false;