The only way I've found to do this is to use a bit of a hack.
1. Create a temporary div
//place in new element
$("body").append("<div id='testParent'></div>");
2. Add each word into the temp div as a span
var words = $(this).html().split(" ");
for(var i = 0; i < words.length; i++)
{
$("#testParent").append("<span>"+words[i]+"</span>");
}
3. Set the CSS:
div#testParent
{
display: inline-block;
width: auto;
}
div#testParent span{
display:block;
}
4. Get the temp div's width and set the parent div's width accordingly
var width = $("#testParent").width();
$("#testParent").remove();
if(width > $(this).width())
$(this).parent(".td-outer").width(width);
I applied the above code to the first element in your fiddle: