Skip to content

Instantly share code, notes, and snippets.

@mtrpcic
Created February 3, 2012 01:00
Show Gist options
  • Save mtrpcic/1726838 to your computer and use it in GitHub Desktop.
Save mtrpcic/1726838 to your computer and use it in GitHub Desktop.
examples
// extensions.js
$.fn.uploader = function(element){
Uploader.show(element);
}
// functions.js
var Uploader = {
"show": function(element){
// code here to show the uploader
},
"hide": function(){
// code here to hide the uploader
}
}
// application.js
$(document).ready(function(){
$("form .user-form .avatar-uploader").click(function(){
$(this).uploader();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment