jquery.delegate() and Coffeescript

I am a newbie in Coffeescript and would like to use the delegate() method in jquery 1.6.4. The method signature is .delegate( selector, eventType, handler ). How do I go about calling this method in Coffeescript? I am using Rails 3.1.

Thanks, Dany.

Answers


just like any other method in coffeescript?

($ 'body').delegate '.external.link', 'click', (evt) ->
  # handler body

i feel like i'm missing something about your question...


Need Your Help

Python split by regular expression?

python regex email split

Okay, in python, I am extracting emails from a string like so:

SDL/C++ include problems

c++ types include sdl

I started doing game for my school project in C++ with SDL library. But I cannot find what am I doing wrong in code below.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.