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

ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...