I want to hide every image in the page with a certain src atribute, except the images with parent a element which has a href attribute starting with /dailyTickets/front/user.form.php or with /dailyTickets/front/user.php.
I’m using this method, but it hides all the images with src, in the a test he just can’t find the img to do his job
$('img[src=\"/dailyTickets/pics/aide.png\"]').hide();
$('img[src=\"/dailyTickets/pics/aide.png\"]').parent('a[href^=\"/dailyTickets/front/user.form.php\"]').show();
$('img[src=\"/dailyTickets/pics/aide.png\"]').parent('a[href^=\"/dailyTickets/front/user.php\"]').show();
Can anyone help?
Your problem is you are using show() on the parent item, not the image itself. Try something like: