18th March, 19:12
I'm trying to use qTip for validation. When the user clicks on the search button and there is no search term entered, I want the error message to display. The code works, but the qTip does not go away on blur. This this the right approach? Has anyone used qTip for validation? Should it be used for validation?
searchBox.qtip({
content: 'Please enter search term',
show: false,
hide: 'blur'
});
searchButton.click(function() {
if (searchBox.val() == '') {
searchBox.qtip('api').show();
searchBox.focus();
return false;
}
});
Thanks,
Jon
searchBox.qtip({
content: 'Please enter search term',
show: false,
hide: 'blur'
});
searchButton.click(function() {
if (searchBox.val() == '') {
searchBox.qtip('api').show();
searchBox.focus();
return false;
}
});
Thanks,
Jon