jsfiddle to show: http://jsfiddle.net/2DUX2/277/
I'm trying to use jquery validate with tooltipster. It works until I try to add more items and then it tries to go to the form action instead of validating the new fields. Anyone know what I'm doing wrong?
$('#RMAForm input[type="text"], select').tooltipster({
trigger: 'custom',
onlyOne: false,
position: 'right'
});
// initialize validate plugin on the form
$("#RMAForm").validate({
// any other options & rules,
errorPlacement: function (error, element) {
var lastError = $(element).data('lastError'),
newError = $(error).text();
$(element).data('lastError', newError);
if(newError !== '' && newError !== lastError){
$(element).tooltipster('content', newError);
$(element).tooltipster('show');
}
},
success: function (label, element) {
$(element).tooltipster('hide');
}
});
I'm using the required class on the form elements