
Originally Posted by
ddadmin
Each drop down box can be individually placed to the left or right of the anchor link (but beyond that not arbitrarily).
Custom placements won't be possible without modifying the code. It could be possible to use something like (just an example) custom=50
like the "left" tag. This would (in theory) offset it 50 pixels. But you would need to modify the script itself to interpret "custom" like it interprets "left" and then add a way to interpret the "50" as well. Is this required? You might want to post this in the DD scripts paid work requests forum, near the bottom of the main forum page.
EDIT: If you do want to attempt to modify the script to handle this, you would need to modify two lines (probably duplicating them to handle the additional "custom" option):
You would need to check for the "custom" option in addition to left here:
Code:
var orienttoleft=/\[left\]/.test($anchor.attr('rel')) //check for rel="submenuid[left]" to indicate submenu should be left aligned
This line handles the actual positioning. You'd need to add a third condition (custom) and account for it here:
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})
Note that you would need to determine the pixel value (eg 50) and store that, probably when reading the 'custom' tag initially. Then you'd use that to modify the CSS properties.
By the way, I'd recommend two options: positive numbers (like 50) are offset from the right, and negative numbers (like -50) are offset from the left. That would give maximum freedom.
(Of course once that was in place you would no longer need the "left" (or even default) positioning-- you could just use 0 and -0 if you want.)
Bookmarks