i've a problem using Jquery.
This is my html markup:
<li><a class="" value="short" tool="car" type="monov"> text </a></li>
I have to capture, after selecting an LI, "ttol" and "type" attr.
This is my code:
var selectedTool = $(this).attr('tool');
var selectedType = $(this).attr('type');
But it doesn't work, it arrives undefined...But if i use this:
$(this).html();
i get:
<li><a class="" value="short" tool="car" type="monov"> text </a></li>
How can i get these attributes?
Thanks