Skip to content

Instantly share code, notes, and snippets.

@cullophid
Created March 14, 2014 11:47
Show Gist options
  • Save cullophid/9546278 to your computer and use it in GitHub Desktop.
Save cullophid/9546278 to your computer and use it in GitHub Desktop.
jquery plugin snippet. trigger:jquery
<snippet>
<content><![CDATA[
/**
* ${1:name}
*/
/*jslint browser: true, nomen:true*/
/*global \$:true, console:false*/
(function () {
"use strict";
\$.fn.${2:func} = function (${3:params}) {
\$(this).each(function (e, i) {
var that = \$(this);
${4://body}
});
return \$(this);
};
})();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jquery</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment