jQWidgets Forums

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 13 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Menu tooltip Posts
  • Menu tooltip #1180

    Felix
    Member

    I’m creating menu for a website and I want to use your tooltip instead of the default title. I’m little confused about how can I do this. Can I use one tooltip for the all menu items or I have to create new tooltip for every single item?

    Menu tooltip #1201

    Peter Stoev
    Keymaster

    Hi Felix,

    In order to add a tooltip to each menu item, you need to do the following:

    1. Include the jqxtooltip.js script.

    <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>

    2. Add a DIV element to the body.

    <div id='jqxTooltip'></div>

    3. Initialize the jqxTooltip

    $("#jqxTooltip").jqxTooltip({ width: 250 });

    var items =

    4. Loop through the jqxMenu items and add a tooltip to each menu item.

    $("#jqxMenu").jqxMenu('items');
    $.each(items, function () {
    $("#jqxTooltip").jqxTooltip('add', $(this.element), 'jqxTooltip' + i);
    i++;
    });

    Best Regards,
    Peter Stoev

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.