How to add tooltip dialog to items in dijit.form.MultiSelect?
I am a newbie in Dojo, and I am trying add a tooltip dialog to show mo开发者_如何学Gore info of an item in dijit.form.MultiSelect but I have no luck so far. Thanks in advance!
Try this... 1. connect tooltip namespace
dojo.require("dijit.Tooltip");
get all options from multiselect:
var options = dojo.query("#fruit option"); //where 'fruit' - multiselect id
add tooltip for each options
dojo.forEach(options, function (option, i) { new dijit.Tooltip({ connectId: [option], label: "value <b> bla bla bla </b> "+ i }); });
See working page example
精彩评论