Friday, July 6, 2012

Change anchor tag text with jquery

To change the text with jquery simply use this syntax

 $('document').ready(function () {
        $('.txtText').click(function () {
                     alert($(this).text() ); //this will dispaly current text

                     $(this).text('new text ');//this will set new text


         });
    });

No comments:

Post a Comment