I am attempting to use data from an html page in js.coffee script.
The view code is:
<span class="colHeader" data-wostatus-id="<%= wostatus.id %>"><span><%= wostatus.statuscode %></span></span>
Inspecting html looks like this:
<span class="colHeader" data-wostatus-id="4"><span>WAPR</span></span>
So far, so good.
My js.coffee file has:
alert($(this).data('wostatus-id'))
And the results I get = undefined
Thanks for the help!
alert($(this).getAttribute('data-wostatus-id'))?thishere? Looks like it's bound to wrong node.