I would like to change the text of a HTML element but preserve the rest of the inner html with jQuery.
For instance:
Some
try this code
$('a').live('click', function(){ var $img = $(this).find('img'); $(this).text('changed'); $(this).append($img); });