In webform i am using jquery watermarkText that is coming ok.but when i am validating along with watermarktext that not happening can someone tell me solution pls follo is my code
<script type="text/javascript">
$(function () {
$(".water").each(function () {
$tb = $(this);
if ($tb.val() != this.title) {
$tb.removeClass("water");
}
});
$(".water").focus(function () {
$tb = $(this);
if ($tb.val() == this.title) {
$tb.val("");
$tb.removeClass("water");
}
});
$(".water").blur(function () {
$tb = $(this);
if ($.trim($tb.val()) == "") {
$tb.val(this.title);
$tb.addClass("water");
}
});
});
</script>
$('#form1').validate({
rules: {
"<%=txtUserName.UniqueID %>": {
required: true,
},
messages: {
"<%=txtUserName.UniqueID %>": {
required: "<span class='errorArrow'float:'left' padding-right:10px;</span>"
}