Hi I have this simple method which gets triggered when i click inside a textbox.
<script type="text/javascript">
function pageLoad() {
$('input:text').focus(function () {
$('.txt-error-message-icon-email').fadeOut("slow");
$('input:text').removeClass('txt-error-message');
});
}
Basically the .focus event is supposed to fade out a div and remove a class when i click inside the textbox. This is working however when i click the textbox only the div fades then when i click out of the textbox and click it again the css class is removed. Why are these two events not happening on one .focus event?
Try this