You can do something as simple as:
Or even simpler:
<div id="my_funky_box">Click Me!</div>
<% apply_behaviour "#my_funky_box:click" do |page|
page.alert "You clicked me!"
<%= content_tag "div", "Click Me!", :onclick => "alert('Hello World!')" %>