Results 1 to 2 of 2

Thread: DD Mega Menu position - Help Please

  1. #1
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Mega Menu position - Help Please

    1) Script Title: DD Mega Menu

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

    3) Describe problem:

    Hello.

    There is anyway to use rel="cssdrivemenu[center]" or something like [-130px] instead of [left]

    Thank you for help!

  2. #2
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Solved...

    Based on

    this: http://www.dynamicdrive.com/forums/s...nu-positioning
    and
    this: http://www.dynamicdrive.com/forums/s...nu-Positioning

    i did this:

    Copy the first line and add second line with some modifications
    Code:
    var orienttoleft=/\[left\]/.test($anchor.attr('rel')) //check for rel="submenuid[left]" to indicate submenu should be left aligned
    var orienttocuston=/\[custon\]/.test($anchor.attr('rel')) //check for rel="submenuid[custon]" to indicate submenu should be left aligned

    And changed this:

    Code:
    $wrapper.css({visibility:'visible', left:offset.left-(orienttoleft? $wrapper.outerWidth()-$anchor.outerWidth()-ddmegamenu.wrapperoffset[0] : 0), top:offset.top+$anchor.outerHeight(), zIndex:++ddmegamenu.startzindex})
    To this:
    Code:
    if (orienttocuston){
    	$wrapper.css({visibility:'visible', left:offset.left-(orienttoleft? $wrapper.outerWidth()-$anchor.outerWidth()-ddmegamenu.wrapperoffset[0] : 100), top:offset.top+$anchor.outerHeight(), zIndex:++ddmegamenu.startzindex})
    } else {
    	$wrapper.css({visibility:'visible', left:offset.left-(orienttoleft? $wrapper.outerWidth()-$anchor.outerWidth()-ddmegamenu.wrapperoffset[0] : 0), top:offset.top+$anchor.outerHeight(), zIndex:++ddmegamenu.startzindex})
    }
    Where "100" is the pixels that i want to back to the left. Use negative numbers to move to the right.

    And used on my page the code rel="nameofmenu[custon]"


    Details: Im not JavaScript coder... im a php man! Its Logic of programming.

    Thanks for djr33 moderator =)

Similar Threads

  1. DD Mega Menu Help
    By KRAZA1 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 10-15-2012, 12:49 PM
  2. Resolved DD Mega Menu getting cut off
    By alaska in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 09-04-2011, 03:58 PM
  3. DD Mega Menu with php
    By Rambaldi in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-11-2011, 02:39 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
  •