Friday, April 5, 2013

toggle anchor tag text on click of anchor

toggle anchor tag text on click of anchor


 id="reply" href="#">reply

$("#reply").click(function() {
   ($(this).text() === "reply") ? $(this).text("close") : $(this).text("reply");
});

JS FIDDLE LINK 

No comments:

Post a Comment