Skip to content

Instantly share code, notes, and snippets.

@mhulse
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhulse/001ddbac0a1120dd9a6a to your computer and use it in GitHub Desktop.
Save mhulse/001ddbac0a1120dd9a6a to your computer and use it in GitHub Desktop.
Simple way to create a Jquery function for non-jQuery JS code.
// Create the plugin:
window.jQuery.fn.autosize = function() {
return autosize(this);
};
// Use the plugin:
jQuery(function($){
$('textarea').autosize();
});
@mhulse
Copy link
Author

mhulse commented Mar 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment