Hi,
I need to add a tooltip to my WebDropDown to see items that are too long to fit the control. Here is the code that I use:
Hello Carlos,
I just wanted to let you know that I experienced this and have been working around to figure it out for you. I will uodate the case shortly with a suggested approach that will differ from yours.
Hello,
I've already solved the issue.
I just replaced this line:
wdd.get_element().setAttribute("title", string);
with this line:
$(#divDdlObjective td input).attr("title", string);
divDdlObjective is the div where my webdropdown is located.
I'd like to see your approach anyway.
Thanks!
I was about to suggest to handle the jQuery open tooltip event. At this event you can perform the same check and if you need to change the value of the "title" attribute to do it using the same approach:
$(document).tooltip({ open: function (event, ui) {
// check if the active element is the webdropdown input and change the title attribute if needed
}});
The difference that it would make for the customer is that it will show tooltip for the whole
However your approach is cleaner and if you need to set a tooltip for the arrow button also you can use the button tooltip option:
Please let me know if you have further questions on the issue or if you need me to create a sample for you using the described approach.