function MLH_overflow(IdClassDiv,IdClassP) { var p = $('.'+IdClassP); var divh = $('.'+IdClassDiv).height(); while ($(p).outerHeight() > divh) { $(p).text(function(index, text) { return text.replace(/\W*\s(\S)*$/, '...'); }); } }
function MLH_overflow(IdClassDiv,IdClassP) { var p = $('.'+IdClassP); var divh = $('.'+IdClassDiv).height(); while ($(p).outerHeight() > divh) { $(p).text(function(index, text) { return text.replace(/\W*\s(\S)*$/, '...'); }); } }