craigsworks.com - Support Forum

Full Version: QTip for validation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Hi JontyMC,

Can't see why qTip isn't as good an option as any for validation use. At the moment beta2's show: false functionality is broken, but beta3 is due out in the next few hours which fixes this problem ,o stayed tuend on the forums for the release announcement.
Reference URL's