Add tooltips to eric hynds multi select dropdown
-
29-06-2021 - |
Question
I am using the Jquery based multi select dropdown provided by Eric Hynds.
I would like to add tooltip to the selection button and also each item in the dropdown list. The reason - I truncate the text in both the display and the selection list and tooltip is supposed to show the full text. But I cannot find any documentation on how to add this. Any help appreciated. Thanks.
Solution 2
Thanks Rahul. I didnt directly use li, but that did give me an idea. The control internally converts each li item to have a checkbox and a span with text. I gave a class to that particular span control. Before truncating the text, I updated the title property with the text.
$(".truncate").each(function(){
$(this).attr('title', $(this).html());
});
Thanks for your pointer.
OTHER TIPS
your option will get converted to li tags when you use this plugin so give them attribute title this
$('li').attr('title','tooltip text');