In the html file I have several lines similar to:
<th class="col-PT" data-ro="yes" data-jhide="no">PT</th>
I want to be able to extract the attributes data-ro and data-jhide with a script.
In a function I have the following line of code:
var $th = $('th');
I get the length of $th and it's correct and I look at $th with the debugger and it an array of 6 th elements.
I perform the following:
var aa = $th[0]; to get the first element of the array (actually performed within a for loop).
My question is that aa does not recognize the attr() operation.
Can someone point me in the right direction as to how to extract the attribute -- say data-ro -- from the variable aa?
Thanks