SO,
I'm working on adapting @bazmegakapa's script (explained here) to work using inline tags:
<script type="javascript">
var p=$('#fos p');
var divh=$('#fos').height();
while ($(p).outerHeight()>divh) {
$(p).text(function (index, text) {
return text.replace(/\W*\s(\S)*$/, '...');
});
}
</script>
The code (which I've commented out in this JsFiddle) works great until it's placed inside the tags. Any ideas on what could be causing the breakdown? I think @bazmegakapa's script is brilliant, mainly because it's so much shorter and more manageable than other ellipsis plugins out there, and I'd love to figure out how to get over this hurdle and actually implement it in my project. I'm still very much a javascript novice so help from the guys at SO would be great.
-Marcatectura