Hauptmenü öffnen

Memory Alpha Nova β

Änderungen

MediaWiki:Fusion/scripts/Sidebar.js

1.524 Bytes hinzugefügt, 20:07, 27. Aug. 2012
+sidebar
 
(function ($) {
$(function() {
console $('.sidebar-division').logeach(function() { var divisionHeader = $(this).children('Sidebar.js funktioniertdivision-header'); var expandabilityIndicator = '<span class="expandability-indicator">&hellip;</span>'; var divisionLabel = divisionHeader.html(); var cookieName = divisionLabel.toLowerCase().replace(/(<([^>]+)>)/ig,""); $(divisionHeader).append(expandabilityIndicator); if($.cookie('sidebar-division-state-' + cookieName) == 'collapsed') { $(this).addClass('collapsed').children('.division-header').siblings().hide(); } else { $(this).find('.expandability-indicator').hide(); } }); $('.division-header').css({cursor:'pointer'}).click(function() { var wrapper = $(this).parent(); if(wrapper.hasClass('collapsed')) { var divisionLabel = $(this).children('strong').html(); var cookieName = divisionLabel.toLowerCase().replace(/(<([^>]+)>)/ig,""); $(this).siblings().slideDown('slow'); $(this).find('.expandability-indicator').fadeOut(); wrapper.removeClass('collapsed'); $.cookie('sidebar-division-state-' + cookieName, 'expended'); } else { var divisionLabel = $(this).children('strong').html(); var cookieName = divisionLabel.toLowerCase().replace(/(<([^>]+)>)/ig,"") $(this).siblings().slideUp('slow'); $(this).find('.expandability-indicator').fadeIn(); wrapper.addClass('collapsed'); $.cookie('sidebar-division-state-' + cookieName, 'collapsed'); } });
});
})(jQuery);
Anonymer Benutzer