¿Cómo alternar el texto HTML de una etiqueta de anclaje usando jQuery? Quiero un ancla que cuando se hace clic en el texto se alterna entre Show Backgroundy Show Text, así como también se desvanece dentro y fuera de otro div. Esta fue mi mejor suposición:
$(function() {
$("#show-background").click(function () {
$("#content-area").animate({opacity: 'toggle'}, 'slow');
});
$("#show-background").toggle(function (){
$(this).text("Show Background")
.stop();
}, function(){
$(this).text("Show Text")
.stop();
});
});