I am wanting to show a tooltip only on a specific function.
Here is the function
$('#search').submit(function (e) {
//check atleat 1 checkbox is checked
if (!$('.its').is(':checked')) {
//prevent the default form submit if it is not checked
$( ".pk" ).tooltip({
content: "Please select a source"
});
e.preventDefault();
}
})
I want to make a tooltip appear only if they do not have a checkbox selected and they have tried to submit the form, the tooltip will prompt them to check a box before submitting the form.
Is this possible with the jQuery Tooltip widget? All I am finding about the Tooltip widget is how to use onHover or onClick If not is there a recommended tooltip script to use for something like this, or is there a way for me to go about this differently?