I want to use jQuery validate library on a div based select form element. I am using the dropkick library to beautify my selects, but I am having difficulties trying to validate
highlight and unhighlight function might help :)
$('.default').dropkick();
$('.example_form').validate({
highlight: function (element, errorClass) {
$(element).siblings('.dk_container').addClass('error');
$('.dk_toggle').css('border', 'none');
},
unhighlight: function(element, errorClass) {
$(element).siblings('.dk_container').removeClass('error');
$('.dk_toggle').css('border', '1px solid #ccc');
}
});
http://jsfiddle.net/jackoverflow/82XvN/