Possible Duplicate:
How to access this attribute using jquery, given a div defined by this
I have included a simple jsfiddle to illustrate my difficulty:
I wish to access the itemid attribute of this:
<td itemid="1488324">
<div style="margin: 0 auto; width:88px">
<div class="twitter-tweet" style="width:22px; height:22px;"></div>
<div class="facebook-post" style="width:22px; height:22px;"></div>
</div>
</td>
I can’t lookup itemid using jquery directly, I have to start with
$('.facebook-post')
and go from there. I have been advised to use the parent method but it isn’t helping me, any ideas?
1 Answer