I work on rails 3.2 and use coffeescript too .. I have doubts about using jQuery mobile inside my application I have html like
<a href="#" data-item=12 data-status=true class="follow">
<span class="ui-btn-inner">
<span class="ui-btn-text">
Follow
</span>
</span>
</a>
In my coffeescript, I am trying to write a function by clicking this Follow, I am trying to send an ajax call.
when I wrote how
$("a.follow").unbind('click').bind 'click', (event, data) ->
event.stopPropagation()
clickedEl = $(event.target)
console.log(clickedEl)
Console.log occasionally prints a range with the class "ui-btn-text" with "ui-btn-inner".
But in my coffeescript function, I need to actually use the attributes from the tag. How to do it
source
share