Below is the code I am currently using for buttons (I prefer not to change it):
<a href="#" class="button">
Button text
<img src="someimage.png" />
</a>
This CSS styled code creates a sleek button with an icon. To round the left side of the button, I use jQuery:
$('a.button').corner('tl bl 10px');
While this works perfectly, I now need to address buttons without images that should be rounded on both sides. However, rounding all edges for every button won't work as the plugin paints over the icons.
Therefore, I am seeking selectors to choose <a class="button">
elements that contain <img>
child elements, and separate selectors for those without <img>
child elements. Is there a solution for this?
I understand that I could alter the button's class based on its contents, but that approach doesn't sit right with me.