This is a migrated thread and some comments may be shown as answers.

Adding Text to the menu

2 Answers 53 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Lister Potter
Top achievements
Rank 1
Lister Potter asked on 16 Aug 2012, 09:45 PM
I would like to add text to the far right of the menu, not a menu, just some information text.  Is this possible?

2 Answers, 1 is accepted

Sort by
0
Accepted
John DeVight
Top achievements
Rank 1
answered on 17 Aug 2012, 12:45 PM
Hi Lister,

To add text to the far right of a menu, you could add a div with the css style set to float:right.  For example, if I had the following html:
<ul id="menu">
    <li>Framework
        <ul>
            <li>DataSource</li>
            <li>HierarchicalDataSource</li>
            <li>Model</li>
            <li>Node</li>
            <li>ObservableArray</li>
        </ul>
    </li>
    <li>Web
        <ul>
            <li>AutoComplete</li>
            <li>Calendar</li>
            <li>ComboBox</li>
            <li>DatePicker</li>
            <li>DropDownList</li>
        </ul>
    </li>
</ul>

I could initialize the menu and then add a div with some text to float to the far right like this:
$("#menu").kendoMenu();
$("<div>Text added to menu</div>")
    .css({
        "float": "right",
        "padding-right":"8px",
        "padding-top":"8px"
    })
    .appendTo("#menu");

To see an example, you can take a look here: jsFiddle: Kendo UI Adding Text to Menu

Regards,

John DeVight

P.S. - If I answered your question, please mark my response as the answer :-)
0
Lister Potter
Top achievements
Rank 1
answered on 06 Sep 2012, 09:03 PM
Worked great, Thanks!
Tags
Menu
Asked by
Lister Potter
Top achievements
Rank 1
Answers by
John DeVight
Top achievements
Rank 1
Lister Potter
Top achievements
Rank 1
Share this question
or