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

Mobile expand by default

4 Answers 28 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Veteran
Fit2Page asked on 28 Oct 2015, 01:57 PM

Hi,

 

How can I achieve that the Mobile RadMenu is expanded by default when I load the page?

 

Thanks,

Marc

4 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 29 Oct 2015, 07:01 AM
Hi,

Set RenderMode to Mobile:
<telerik:RadMenu runat="server" ID="menu"  RenderMode="Mobile">
              <Items>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
                  <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
              </Items>
          </telerik:RadMenu>


Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 29 Oct 2015, 07:14 AM

Hi Hristo,

 

I don't think I made myself clear enough.

I want to expand the burger menu on default when a user enters the page.

So a simulated hamburger click on server side page load or radmenu.onclientload,

 

Marc

0
Hristo Valyavicharski
Telerik team
answered on 29 Oct 2015, 11:47 AM
Try this:

<script type="text/javascript">
    function menuLoad(sender, args) {
        $(".rmRootToggle").click();
    }
</script>
<div>
    <telerik:RadMenu runat="server" ID="menu"  RenderMode="Mobile" OnClientLoad="menuLoad">
        <Items>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="ITem 1"></telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
</div>


Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 30 Oct 2015, 07:36 AM

Yes Hristo, that is what I was looking for.

 

Thanks,

Marc

Tags
Menu
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Hristo Valyavicharski
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or