#114015, advanced menu settings to place menu anywhere on page, patch by Steve McKenzie, modified by me

This commit is contained in:
Ted Serbinski
2007-01-30 05:41:41 +00:00
parent a5022b38fc
commit 6085946d1d
2 changed files with 51 additions and 8 deletions

View File

@@ -3,9 +3,22 @@
$(document).ready(function() {
// get the Drupal basepath
var basePath = Drupal.settings.simplemenu.basePath;
// insert extra <br /> so menu doesn't overlap theme
$('<ul id="simplemenu" class="clear-block"></ul>').prependTo('body');
// get the element to add the menu to
var element = Drupal.settings.simplemenu.element;
var menu = '<ul id="simplemenu" class="clear-block"></ul>';
switch (Drupal.settings.simplemenu.placement) {
case 'prepend':
$(menu).prependTo(element);
break;
case 'append':
$(menu).appendTo(element);
break;
case 'replace':
$(element).html(menu);
break;
}
$('body').css('margin-top', '23px');
// Drupal menu callback