7
Answers

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

Ask a question
ashok kumar

ashok kumar

11y
4.7k
1
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)