So I have this piece of html
<td class="role-span"><span class="label"><% user.role %></span></td>
And I'm trying to get user.role value for each cell of the table like so
$(document).ready(function() {
$('.role-span').map(function() {
alert($(this).text());
})
});
I'm able to get the span text value if I it is hard coded but if it's a <% %>
it doesn't work anymore.
Any thoughts on that ?
Thanks