[Solved] Get img alt which parent a’s href is something [closed]


// will match http://localhost only:
$('a[href="http://localhost"]').find('img').attr('alt'); 

// will match links hreffing to URLs starting with http://localhost 
$('a[href^="http://localhost"]').find('img').attr('alt');

6

solved Get img alt which parent a’s href is something [closed]