I have more textbox controls in my page and when text is redundant, then the CSS or class should be changed, and when something Is the text I need to change the current CSS or class. I am not getting the argument how to do it. My design code is:
& lt; Asp: text box id = "txtfirstname" runat = "server" cssClass = "field" width = "150px" & gt; & Lt; / Asp: text box & gt; ; & Lt; Asp: text box id = "txtLastName" runat = "server" CssClass = "field" width = "150px" & gt; & Lt; / Asp: text box & gt; & Lt; ASP: Text Box ID = "TestMail" Runat = "Server" CssClass = "field" width = "150px" & gt; & Lt; / Asp: text box & gt; & Lt; Asp: text box id = "txtpassword" runat = "server" cssClass = "field" width = "150px" & gt; & Lt; / Asp: text box & gt; & Lt; ASP: Text Box ID = "Text Confirm Password" Runat = "Server" CssClass = "field" width = "150px" & gt; & Lt; / Asp: text box & gt;
$ ('# element'). Keypress (function (if ($ (this) .val () == '') {$ (this) .removeClass ('myClass');} and {$ (this) .addClass ('myClass');} });
Comments
Post a Comment