Select all a-elements that enclose img-elements [closed]

I am searching. I am searching. Preferably, I would like an CSS-Selector, if not possible, jquery selector would also be nice.


solution

As it currently is, there are no parent selectors in CSS - yet anyways.

You can use the :has selector in jQuery.

$('a:has(img)').css("background","red");

jsFiddle example