I want to do following: Have an tag inside an tag. listen to click() event of a tag. in click-event i want to check if img tag has an specific attribute or not.
for example:
<a href='#' id='myid'><img src='' alt='' played='1'></a>
$('#myid').click(function(e){
if(e.target.attr('played')){
// do something...
}
});
how can i get the attribute of my img tag? i never check the element-handlers in jquery...
kind regards!