Why is this not working? I'm trying to add a clas so I can add padding to the default Magento CMS image styles - big thanks in advance. Ignore the j - it has to be there
if ($j('.cms-page-view .std img').css('float') == 'left') {
$j('.cms-page-view .std img').addClass('img-left');
}
else if ($j('.cms-page-view .std img').css('float') == 'right') {
$j('.cms-page-view .std img').addClass('img-right');
}
else {
$j('.cms-page-view .std img').addClass('img-normal');
}
Aucun commentaire:
Enregistrer un commentaire