$("#homeRotation .swFader .scrollable .items .item").each(function() {
if ($(this).find(".title").is(":empty") && $(this).find(".description").is(":empty")) {
$(this).find(".caption").remove();
}
});
// I'm sure this can be done in a better way (the code below) - I just needed a way for it to also remove the title if it is empty and/or remove the description only if it is empty
$("#topRotation .swFader .scrollable .items .item").each(function() {
if ($(this).find(".title").is(":empty") && $(this).find(".description").is(":empty")) {
$(this).find(".caption").remove();
}
if ($(this).find(".title").is(":empty")) {
$(this).find(".title").remove();
}
if ($(this).find(".description").is(":empty")) {
$(this).find(".description").remove();
}
});