Results 1 to 3 of 3

Thread: Responsive Side Toggle Menu fixed and no Javascript on wide screens

  1. #1
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    61
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Responsive Side Toggle Menu fixed and no Javascript on wide screens

    1) Script Title: Responsive Side Toggle Menu

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex...togglemenu.htm

    3) Describe problem: I've been using the Responsive Side Toggle Menu for some time and it works fine. It is set to open on page load in screens over 680 px and has no toggle button. Under 680px the hamburger menu kicks in.

    Code:
    <script>
    jQuery(function(){
    menu1 = new sidetogglemenu({
    id: 'togglemenu1',
    marginoffset: 10,
    position: 'left'
    })
    if (window.innerWidth > 680)
    menu1.toggle();
    })
    </script>
    However, I'm having issues with page load times according to Google Analytics and I read that Javascript shouldn't be used for "core operations" like depending on it for opening menu on page load. I have also noticed that by default many iPads do not use Javascript so my sidebar menu does not open at all on these devices.

    My question is whether the sidebar menu can be set to be open on screens over 680px as a simple fixed div (with own vertical scroll bar as menu is long) with NO call on Javascript at all (eg. slide in effect) - in other words, just CSS. I don't need the toggle feature on the wider screens. Screens <680 would be responsive with the hamburger.

    Perhaps I chose the wrong responsive menu type from the beginning but as there are many pages to my site, changing to another menu type now might be very laborious.

    Thanks for any help you can provide.

    Mike

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    486
    Thanks
    8
    Thanked 52 Times in 50 Posts

    Default

    Actually, all browsers usually used JavaScript. Unless they, the uses, have it disabled. The probably is actually how browsers and OS read the JavaScript. However, I am currently at work but once I get home Ill take a look into it unless someone beats me to it (which is fine).
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  3. #3
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    61
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Just to say, Thanks for taking this up. I haven't gone away, Deadweight (or illustrious colleagues at DD), and am keen to implement your solutions.

Similar Threads

  1. Responsive Side Toggle Menu and SSL
    By green in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-11-2018, 06:06 AM
  2. Responsive side toggle menu with adsense
    By green in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 01-14-2018, 02:59 PM
  3. Responsive Side Toggle Menu
    By jdadwilson in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 12-16-2015, 06:45 PM
  4. Responsive Side Toggle Menu - CSS Glitch
    By Beverleyh in forum Bug reports
    Replies: 0
    Last Post: 11-15-2015, 11:34 AM
  5. Responsive Side Toggle Menu
    By Thin Lizzy in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 11-07-2015, 01:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •