simplemenu.js 856 B

12345678910111213141516171819202122232425262728293031
  1. // $Id$
  2. $(document).ready(function() {
  3. // get the Drupal basepath
  4. var basePath = Drupal.settings.simplemenu.basePath;
  5. // get the element to add the menu to
  6. var element = Drupal.settings.simplemenu.element;
  7. var menu = '<ul id="simplemenu" class="clear-block"></ul>';
  8. switch (Drupal.settings.simplemenu.placement) {
  9. case 'prepend':
  10. $(menu).prependTo(element);
  11. break;
  12. case 'append':
  13. $(menu).appendTo(element);
  14. break;
  15. case 'replace':
  16. $(element).html(menu);
  17. break;
  18. }
  19. $('body').css('margin-top', '23px');
  20. // Build menu
  21. $('#simplemenu').append(simplemenu);
  22. $('#simplemenu li').hover(function() {
  23. $('ul', this).slideDown(200);
  24. }, function() {});
  25. $('#simplemenu a').title('');
  26. $('#simplemenu').children('li.expanded').addClass('root');
  27. });