helllo forums,
In jquery how do you get an element id
example:
<a href=“test.php” class=“test” id=“12” />test</a>
$('.test').click(function(){
//alert id here...how?
});
Thanks
helllo forums,
In jquery how do you get an element id
example:
<a href=“test.php” class=“test” id=“12” />test</a>
$('.test').click(function(){
//alert id here...how?
});
Thanks
$('.test').click(function(){
alert($(this).attr('id'));
});
Wow thanx Scallio… such a noob question hahaha.