ashok kumar

ashok kumar

  • NA
  • 89
  • 36.1k

how to remove the css class of an asp:textbox using jquery

Jul 18 2013 4:48 AM
Hi all,
          i need to remove the css class of my textbox on focus event:
jquery:

function searchBoxfocus () {
               document.getElementById('<%= txtusername.ClientID%>').value = "";
               $('#txtusername').removeClass('text-label');
               $('#txtusername').addClass('glow');
           
            }



                    <asp:TextBox ID="txtusername" runat="server"  Text="USER NAME" onblur="searchBoxblur();"  onfocus="searchBoxfocus();" CssClass="text-label" AutoPostBack="true"></asp:TextBox>
          
pls help me out the class "text-label " is not removing.

Answers (7)