I would like to change the text of a HTML element but preserve the rest of the inner html with jQuery.
For instance:
Some
Shorthand for more elements and leading text to change:
elemshtml = ''; $("a *").each(function(){elemshtml +=$(this)[0].outerHTML}); $("a").html('Some text' + elemshtml);