title: Binding click event in jquery coffeescript
body: <p>I am working on rails 3.2 and using coffeescript too..
  I have a doubt in using jquery mobile inside my application
  I have a html like</p>
  
  <pre><code>&lt;a href="#" data-item=12 data-status=true class="follow"&gt;
    &lt;span class="ui-btn-inner"&gt;
      &lt;span class="ui-btn-text"&gt;
        Follow
      &lt;/span&gt;
    &lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>In my coffeescript, i am trying to write function on click of this Follow, i am trying to send a ajax call.</p>
  
  <p>when i wrote like</p>
  
  <pre><code>  $("a.follow").unbind('click').bind 'click', (event, data) -&gt;
        event.stopPropagation()
        clickedEl = $(event.target)
        console.log(clickedEl)
  </code></pre>
  
  <p>Console.log prints span with class "ui-btn-text" at times and span with "ui-btn-inner" at times. </p>
  
  <p>But in my coffeescript function , i need to actually take attributes from a tag. How to proceed with this</p>