Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jQuery Plugin Stub
(function($) {
var settings;
var methods = {
init: function(options){
// Create some defaults, extending them with any options that were provided
settings = $.extend({
}, options);
return this
$.fn.mediaTextfield = function(method){
return methods[method].apply(this,, 1));
else if(typeof method === 'object' || !method){
return methods.init.apply(this, arguments);
$.error('Method ' + method + ' does not exist.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment