I managed to solve the problem. This is due to the addition of the 'dummy' check item that appears when the page loads. As soon as the user enters a value in the corresponding field, the dummy element is hidden and the real one is displayed.
I used the highlight and unhighlight parameters for the validation method to achieve what I wanted.
$("#myform").validate({ highlight: function(element){ if($(element).hasClass("math")){ $(".temp").hide(); } }, unhighlight: function(element){ if($(element).hasClass("math")){ $(".temp").hide(); } } });
Perhaps this will help someone else in the future.
boz
source share