Last active
August 29, 2015 14:16
-
-
Save mhulse/001ddbac0a1120dd9a6a to your computer and use it in GitHub Desktop.
Simple way to create a Jquery function for non-jQuery JS code.
This file contains 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
// Create the plugin: | |
window.jQuery.fn.autosize = function() { | |
return autosize(this); | |
}; | |
// Use the plugin: | |
jQuery(function($){ | |
$('textarea').autosize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.jacklmoore.com/autosize/