Results 1 to 7 of 7

Thread: How to modify - All levels navigation menu

  1. #1
    Join Date
    Mar 2014
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question How to modify - All levels navigation menu

    Script: All levels navigation menu
    http://www.dynamicdrive.com/dynamici...menu/index.htm

    Hi,
    I would like to ask, if it is possible that a submenu to be slide from right to left, not left to right?
    I hope you understand my question ...
    Sorry for my english
    Thank you in advance!

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    Its easy enough to make the menus always flyout from right to left - this is just a code fragment due to the length of the script and post character limit, but locate the 2 lines in red in your own js file, and comment them out (or delete them). There will be no slide effect though as that would need a rewrite.

    Code:
    ...
    
    			//Sub menu starting left position
    			var menuleft=(this._istoplevel? this._offsets.left + (dir=="sidebar"? this._dimensions.w : 0) : this._dimensions.w)
    // comment out this line			if (submenurightedge-scrollX>ddlevelsmenu.docwidth){
    				menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)
    // comment out this line			}
    			submenu.parentNode.style.left=menuleft+"px"
    			//Sub menu starting top position
    			var menutop=(this._istoplevel? this._offsets.top + (dir=="sidebar"? 0 : this._dimensions.h) : this.offsetTop)
    			if (submenubottomedge-scrollY>ddlevelsmenu.docheight){ //no room downwards?
    				if (this._dimensions.submenuh<this._offsets.top+(dir=="sidebar"? this._dimensions.h : 0)-scrollY){ //move up?
    					menutop+= - this._dimensions.submenuh + (this._istoplevel && dir=="topbar"? -this._dimensions.h : this._dimensions.h)
    				}
    				else{ //top of window edge
    					menutop+= -(this._offsets.top-scrollY) + (this._istoplevel && dir=="topbar"? -this._dimensions.h : 0)
    				}
    			}
    
    ...
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    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 |
    The only limit to creativity is imagination: JemCon.org

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    boppzoli (03-25-2014)

  4. #3
    Join Date
    Mar 2014
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Oooo, yes!
    Thank you very much Beverleyh!
    It is exactly what I wanted !!!

  5. #4
    Join Date
    Mar 2014
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi, I have an another question, too ...
    How can I display the arrow (arrow-right.gif image) in the left side of the submenus?
    Is this possible, too?
    Thank you again!

  6. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    I can't test as I'm on iPhone at the mo but have a look in the ddlevelsmenu-base.css file, at the .rightarrowpointer definitions, and play around with the positioning. Maybe change left:100px; to margin-left:-135px; (a negative value to pull it over to the left) - higher or lower depending on the width of your button. Also replace the arrow image with one that points the other way for best effect
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    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 |
    The only limit to creativity is imagination: JemCon.org

  7. The Following User Says Thank You to Beverleyh For This Useful Post:

    boppzoli (03-26-2014)

  8. #6
    Join Date
    Mar 2014
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi,
    It works!
    I mirrored the arrow-right.gif image and now it's perfect!
    Thanks, again!

  9. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    no problem
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    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 |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. All levels navigation menu HELP
    By dominiko in forum JavaScript
    Replies: 0
    Last Post: 07-14-2012, 01:02 PM
  2. All Levels Navigation menu help
    By sungirl in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 05-06-2009, 12:28 PM
  3. All Levels Navigation Menu Help Needed!
    By bpew in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 01-03-2009, 05:08 AM
  4. All Levels Navigation Menu (Side)
    By RPFeynman in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 12-16-2008, 03:24 AM
  5. Can i use images with the All Levels Navigation Menu
    By rwilk in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-12-2008, 03:27 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
  •