Allan & Steve are the chubby founders of LessEverything. This is their blog, hear them rant, praise, give advice and talk about Just Stuff, Less Accounting, Lovd by Less, More Honey, Less Memories, Code, Business, Design, Marketing
Chat with Us
June 26th, 2007

Today's Textmate Tip

written by Steven Bristol

Here is a snippet all of you jQuery on Rails people can use:

Here’s how to make a snippet that will output:


jq(function(){

})
# Control-Option-Command-b to open the Bundle Editor. # Go to either the HTML or Javascript bundle (or jQuery bundle (you did know there was a jQuery bundle right?)). # Click on the Plus at the bottom left of the editor to create a new snippet. # Name the snippet “jq” or something. # Paste the following in the Editor window and close the window.

jq(function(){
  $1
})

Now you can jq->tab to get the snippet.

In an rhtml file the cool [obtrusive javascript] kids go: script->tab->jq->tab ;)

Leave a Reply