The CMS I'm using doesn't seem to apply a class name if the element is floated left or right. I was hoping to not have to mess with the TinyMCE code stuff, and instead do this with jQuery.
Right now, when I align an image to the left or right, it will add the styles inline with the image like so:
<img src="image.jpg" style="float:left">
I was hoping that for those elements that have that style applied, I could add a class name of "alignleft". I tried this, but it does not work:
$( 'a[ style=' + 'float: left;' + ']' ).addClass( 'alignleft' );
Thoughts?
'a[ style=float: left;]'