Himas Rafeek
Posted on: 1 year ago
CSS

on focus remove default value and “itl” class


                                          $('.removeVal').live("click focus", function() {
    if (this.value == this.defaultValue) {
        this.value = '';
        $(this).removeClass("itl");
    }
}
);
$('.removeVal').live("blur", function() {
    if (this.value == '' || this.value == this.defaultValue) {
        this.value = this.defaultValue;
        $(this).addClass("itl");
    }
}
);