开发者

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");
  1. get all options from multiselect:

    var options = dojo.query("#fruit option"); //where 'fruit' - multiselect id

  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜