tooltip for help icons
in Using jQuery UI
•
5 years ago
I want to place a help icon next to each form field, and show tooltip as long as mouse is on the help icon (just on icon not clicking it.) I don't want to show tooltip by hover on form field like the demo.
I have several help icons and by mouse hover on each of them, a separate message should be shown just for that help icon.
reading documentation I am confused between this:
- $( ".selector" ).tooltip({
items: "img[alt]"
});
and this one:
$( function() {
var tooltips = $( "[title]" ).tooltip({
position: {
my: "left top",
at: "right+5 top-5",
collision: "none"
}
});
});
I assume, the first one is for showing alt of all images and I don't want that happens. I guess I can have title tag for help icons and the second function shows them? Is it the correct choice for what I want to do? Or what is the best way to go?
1