Hi! I was wondering how I would go about implementing this:
<div id="1234345" class="item">
<script type="text/javascript">
function getItem() {
alert($(this).attr('id')); // I want this to be 1234345
}
getItem();
</script>
</div>
<div id="1239345" class="item">
<script type="text/javascript">
function getItem() {
alert($(this).attr('id')); // I want this to be 1239345
}
getItem();
</script>
</div>
Neither of them work, but I need to make sure that both sections have exactly the same code, but return the right ids.