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

How to I remove a menu item that has blank text?

1 Answer 118 Views
Menu
This is a migrated thread and some comments may be shown as answers.
gregory
Top achievements
Rank 1
gregory asked on 11 Mar 2019, 10:40 PM

Hello,

 

I have a 'hamburger' icon to open up a responsive panel on the menu, and am trying to remove it when the device is a desktop when the width is greater than the breakpoint. However, the menu item does not contain any text, it just shows the hamburger icon provided by font-awesome:

Code:

{ text: "", spriteCssClass: "fa fa-search", url: "javascript:createSearchWindow();"},
{ text: "", spriteCssClass: "fa fa-bars", url: "javascript:toggleSideBarPanel(<cfoutput>#layerNumber#</cfoutput>);" }

There is a remove method for the menu, but by looking at the example it needs to have a reference to the tree. Is it possible to remove the last item (fa fa-bars) and not the item above it that pops up the search window? 

I have a really complex responsive panel, placed in several div's, but it does not work when the screen size is above the breakpoint. See http://gregoryalexander.com/blogCfc/client/ using a desktop device above 1280 pixels.

1 Answer, 1 is accepted

Sort by
0
gregory
Top achievements
Rank 1
answered on 12 Mar 2019, 12:06 AM

Nevermind. I think that I found the solution here.

 

// When the screen is larger than the breakpoint, remove the hamburger in the menu (the 5th node).
$(".k-menu > li:eq(4)").show();

https://dojo.telerik.com/obabIL

Tags
Menu
Asked by
gregory
Top achievements
Rank 1
Answers by
gregory
Top achievements
Rank 1
Share this question
or