Permalink
Browse files

Add jQuery plugin base

  • Loading branch information...
kneath committed Aug 26, 2010
1 parent da2e307 commit 375f32218cbc5e40303bde303082d82be7387ca1
Showing with 29 additions and 0 deletions.
  1. +1 −0 README.markdown
  2. +28 −0 jQuery Plugin.tmSnippet
View
@@ -7,6 +7,7 @@ A collection of Textmate snippets & bundles I find useful.
* `/c` (HTML) expands into a `<!-- /end -->` comment (useful for ending id/class groups)
* `reset` (CSS) expands into a CSS reset block I've become accustomed to using
* `gradient` (CSS) expands into an Internet Explorer, Safari, and Firefox friendly CSS-Gradient syntax (and falls back gracefully)
+* `jp` (Javascript) expands into a best practices jQuery plugin.
## Command Triggers
View
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>bundleUUID</key>
+ <string>4D798994-A6A1-4F7E-B06B-439743EC92D5</string>
+ <key>content</key>
+ <string>(function(\$){
+ \$.fn.$1 = function(options){
+ var opts = \$.extend({}, \$.fn.$1.defaults, options);
+
+ return this.each(function(){
+ $2
+ })
+ }
+
+ \$.fn.$1.defaults = {
+
+ }
+})(jQuery);</string>
+ <key>name</key>
+ <string>jQuery Plugin</string>
+ <key>tabTrigger</key>
+ <string>jp</string>
+ <key>uuid</key>
+ <string>1291F8B1-087F-4B86-A9DB-CC3518969F40</string>
+</dict>
+</plist>

0 comments on commit 375f322

Please sign in to comment.