Announcing:

LessMoney Conference will be June 7th in Tampa! Register today and make us smile super big!

Today's Textmate Tip

written by Steven on June 26, 2007

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 ;)

Learn how LessEverything built their consultancy to over $1,000,000 annual revenue at LessMoney Conference, June 7th in Tampa Florida. Each attendee will get early access to our upcoming ebook as well.

Leave a Comment

About Steven
Steven Bristol has written code for the past 20 years. He like green vegetables and kittens, oh and butterflies too. He loves to throw ninja stars at his enemies.

You Should...

Follow Steven on Twitter
Friend Steven on Facebook
Subscribe
LessEverything Copyright 2011 LessEverything.com
We don't like footers, they're kinda boring