There's a div with some content in it. Initially, this function works well when the page loads. However, if I use JavaScript to update the div with new content, this function stops working.
I'm stuck and not sure how to fix this issue. Can anyone offer suggestions on how to get this to work properly?
$("textarea.indent").each(function(){
var indentWidth = $(this).siblings('[class=indent]').width();
if(indentWidth != null)
$(this).css('text-indent', (indentWidth+5)+'px');
});