I'm trying to add some style properties on an image but only if it already contains another property. I have more or less figure out how to do this with the following:
if ($('#content p img').css('float') == 'right')
$('#content p img').css('margin-left', '20px').css('margin-bottom', '20px');
But this obviously changes all images so they have margin left and bottom. How can I do the same but only add the margin to the images that has the float: right;
property?