Results 1 to 8 of 8

Thread: Responsive Side Toggle Menu

  1. #1
    Join Date
    Oct 2015
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Responsive Side Toggle Menu

    1) Script Title: Responsive Side Toggle Menu

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

    3) Describe problem: How to enable to toggle the menu automatically, without clicking on the button?

    Many thanks for your help.
    TL
    Last edited by james438; 10-21-2015 at 12:43 AM. Reason: added link ;)

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Please provide a link to the Dynamic Drive demo page.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    link to script home page
    http://www.dynamicdrive.com/dynamici...togglemenu.htm

    the call
    Code:
    menu1.toggle();
    will toggle the menu if called within another function or by an onclick event

    if the initialisation call is placed just before the </BODY> tag the menu will open as the page is opened

    Code:
    	menu1 = new sidetogglemenu({  // initialize first menu example
    		id: 'togglemenu1',
    		marginoffset: 10,
    		downarrowsrc: 'toggledown.png'
    	})
    the menu can also be opened or closed using keywords

    Code:
    <button onClick="menu1.toggle('open');" class="sideviewtoggle">Open Menu 1</button>
    <button onClick="menu1.toggle('closed')" class="sideviewtoggle">Close Menu 1</button>
    within a function or by an onclick event
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  4. #4
    Join Date
    Oct 2015
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Beverleyh and vwphillips,

    many thanks for your help. I have tried the suggestions but it seems sometimes it works, sometimes it doesn't work on my 17" monitor.

    I tried to call the script with a body onload element:

    <body onLoad="menu1.toggle('open');" class="sideviewtoggle">

    Before the </body> tag I used this one:
    <script>
    menu1 = new sidetogglemenu({ // initialize first menu example
    id: 'togglemenu1',
    marginoffset: 10,
    downarrowsrc: 'toggledown.png'
    })

    </script>

    Should I use maybe a window.onload call?

    Many thanks for your help.

  5. #5
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    place the initilization and open call just before the </BODY> tag

    Code:
    <script>
    menu1 = new sidetogglemenu({ // initialize first menu example
    id: 'togglemenu1',
    marginoffset: 10,
    downarrowsrc: 'toggledown.png'
    })
    
    menu1.toggle('open');
    </script>
    
    </body>
    if this still has problems post a link to your page
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  6. #6
    Join Date
    Oct 2015
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, Vic,

    it seems I have to be more accurate in my question. So: my menu toggles, the menu makes for yourself the room but it has no content, it is empty.

    When I use the onClick event the menu works and also his contain is visible. The only difference between the two methods is the <class="sideviewtoggle"> which is present in the onClick command but isn't present in your code above. How to cal this class in the script?

    Many thanks.

  7. #7
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    your last post only adds confusion

    please post a link to the problem page
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  8. #8
    Join Date
    Oct 2015
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for my late answer. I have tried many solutions to find a working one, and finally I have found the absolute best here:
    http://www.dynamicdrive.com/forums/s...-Menu-Reversed

    Many thanks once again for your recommendations and help. My question can be marked as Resolved, too. Long live Dynamicdrive!

Similar Threads

  1. DOM errors in Responsive Side Toggle Menu?
    By chas in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-04-2015, 04:08 AM
  2. Custom image for 'Toggle Menu' event in Side Push Menu
    By Neil1 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 05-28-2014, 04:08 PM
  3. Resolved Responsive Side Toggle Menu Reversed
    By adaml_ipa in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 03-25-2014, 07:53 PM
  4. Smooth Navigational Menu (v1.5) want to display as dropline side by side
    By jqdesigner in forum Dynamic Drive scripts help
    Replies: 19
    Last Post: 01-30-2013, 03:35 PM
  5. Replies: 2
    Last Post: 09-17-2011, 10:15 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
  •