How to toggle HTML text of an anchor tag using jQuery? I want an anchor that when clicked the text alternates between Show Background & Show Text
Show Background
Show Text
Why don't you just stack them ::
$("#clickedItem").click(function(){ $("#animatedItem").animate( // ); }).toggle( // <--- you just stack the toggle function here ... function(){ $(this).text( // ); }, function(){ $(this).text( // ); });