remove AJAX callback, pass menu structure to page directly, dramatically faster, 1 less HTTP request, clear your menu cache, can produce weirdness/infinit loops
This commit is contained in:
@@ -21,12 +21,11 @@ $(document).ready(function() {
|
||||
|
||||
$('body').css('margin-top', '23px');
|
||||
|
||||
// Drupal menu callback
|
||||
$('#simplemenu').load(basePath + 'simplemenu/menu', function() {
|
||||
$('li', this).hover(function() {
|
||||
$('ul', this).slideDown(200);
|
||||
}, function() {});
|
||||
$('a', this).title('');
|
||||
$(this).children('li.expanded').addClass('root');
|
||||
});
|
||||
// Build menu
|
||||
$('#simplemenu').append(simplemenu);
|
||||
$('#simplemenu li').hover(function() {
|
||||
$('ul', this).slideDown(200);
|
||||
}, function() {});
|
||||
$('#simplemenu a').title('');
|
||||
$('#simplemenu').children('li.expanded').addClass('root');
|
||||
});
|
||||
Reference in New Issue
Block a user