I'm trying to scale images that have a width greater than 100. I'm using the code below, but it scales images that are even below 100px... What am I doing wrong?
if($(".image-attach-body")) {
if($(".image-attach-body a")) {
$(".image-attach-body a").each(function() {
var width = $("span span img").width();
if(width > 100) {
$("span span img").cjObjectScaler({
destObj: $(".image-attach-body"),
method: "fit",
});
}
});
}
}