jQWidgets Forums

jQuery UI Widgets Forums General Discussions Lists DropDownList Tooltip for dropdown list item

This topic contains 17 replies, has 2 voices, and was last updated by  mallepaddi 11 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
  • Tooltip for dropdown list item #51247

    mallepaddi
    Participant

    Hi

    There are many Drop down list boxes appearing on a page and some of them are disabled with selected value.

    Is it possible to implement “tooltip” for drop downs showing text of selected item whether it was enabled or disabled ?

    Thanks

    Tooltip for dropdown list item #51251

    mallepaddi
    Participant

    Hi

    Data populating into dropdown boxes are coming from backend.

    Thanks

    Tooltip for dropdown list item #51254

    Peter Stoev
    Keymaster

    Hi mallepaddi,

    You can use jqxTooltip for displaying tooltip for any HTML Element on your web page. Example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtooltip/index.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tooltip for dropdown list item #51255

    mallepaddi
    Participant

    HI

    Please help, on how to integrate it for dropdown ?

    Which event should use ?

    Thanks

    Tooltip for dropdown list item #51256

    Peter Stoev
    Keymaster

    Hi mallepaddi,

    It does not matter whether it is DropDownList or a simple DIV tag. It works the same way. The example which I pointed out, shows how to attach a Tooltip to HTML Element. The same approach is valid for the DropDownList.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tooltip for dropdown list item #51257

    mallepaddi
    Participant

    HI

    Following code doesn’t work … please advice

    renderer: function (index, label, value) {
    $(“#listitem”+index+”innerListBoxcomboBoxSoldTo”).jqxTooltip({ content: ‘<b>’+value+'</b>’, position: ‘mouse’, name: ‘tooltip’});
    }

    Thanks

    Tooltip for dropdown list item #51260

    Peter Stoev
    Keymaster

    Hi mallepaddi,

    You have to add a Tooltip to the DropDownList, not to its Items. From “Is it possible to implement “tooltip” for drop downs showing text of selected item”, I understand that you want a tooltip for the selected item which is displayed when the DropDownList is closed. Well, you should add a Tooltip to the DropDownList.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tooltip for dropdown list item #51262

    mallepaddi
    Participant

    Hi

    Anything wrong here ..

    $(“#comboBoxXYZ”).jqxDropDownList( { …….. });

    $(“#comboBoxXYZ”).jqxTooltip({ content: $(‘#comboBoxXYZ’).val(), position: ‘mouse’, name: ‘tooltip’});

    Thanks

    Tooltip for dropdown list item #51268

    mallepaddi
    Participant

    Hi

    it works on ‘change’ event, great help.

    Thanks

    Tooltip for dropdown list item #51277

    mallepaddi
    Participant

    Hi

    How come .. below code displays tooltip of selected item but, calling $(‘#comboBox’).val() returning ”, but it returns exact selected value if i comment below tooltip code/

    $(“#comboBox”).on(‘change’, function (event) {
    $(“#comboBox”).jqxTooltip({ content: item.label, position: ‘mouse’, name: ‘tooltip’});
    }

    Any help ?

    Thanks

    Tooltip for dropdown list item #51279

    Peter Stoev
    Keymaster

    In your code you use item.label, but item is undefined.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tooltip for dropdown list item #51281

    mallepaddi
    Participant

    HI

    This is actual code ..

    $(“#comboBox”).on(‘change’, function (event) {
    var item = event.args.item;
    if (item) {
    $(“#comboBox”).jqxTooltip({ content: item.label, position: ‘mouse’, name: ‘tooltip’});
    }
    });

    Thanks

    Tooltip for dropdown list item #51286

    Peter Stoev
    Keymaster

    Hi,

    I don’t understand your problem. item.label returns the label and that works correctly. The Tooltip will display the selected item’s text. Isn’t that what you want? If you want to display the selected value instead of the text, then use item.value instead of item.label.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tooltip for dropdown list item #51288

    mallepaddi
    Participant

    Hi,

    Let me explain clearly.

    Having a dropdown and we are using user selected entry to save into database and same time we need to show “tooltip” for longer text labels.

    There are two different functionalists for dropdown .. 1) have to show toopltip for selecte entry and second we need dropdown selected entry for some purpose in backend.

    If no tooltip code, we are able to get value of dropdown .. like $(‘#box’).val(), but when we placed tooltip code, tooltip appearing but val()method returning NULL.

    Hope you understand, problem is not with displaying tooltip, we get NULL when tooptip code in place.

    Thanks

    Thanks

    Tooltip for dropdown list item #51289

    Peter Stoev
    Keymaster

    Hi,

    If you wish, provide a JSFiddle, which demonstrates your scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.