Wikia

Layton Wiki

Monobook.js

MediaWiki page

2,300pages on
this wiki
Talk0

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Chrome - Windows: Hold the Ctrl key and press the F5 key. OS X: Hold both the ⌘ Cmd and ⇧ Shift keys and press the R key.
  • Safari - Hold down the ⇧ Shift key and click the Reload toolbar button.
  • Firefox - Windows: Hold the Ctrl key, and press F5. OS X: Hold the ⌘ Cmd and ⇧ Shift keys, and then press R.
  • Internet Explorer - Hold the Ctrl key, and press F5 (or click the Refresh button).
/* Any JavaScript here will be loaded for users using the MonoBook skin */
/* See also: [[MediaWiki:Common.js]] */
 
/** Sub navigation menus (Monobook version) *****************************
 *
 * Allows you to create dynamic sub navigation menus.
 * Can be tweaked to contain an infinite amount of submenus.
 *
 * Code by [[User:Tjcool007]] from http://layton.wikia.com/
 */
 
$.get('http://layton.wikia.com/index.php?title=MediaWiki:SuperSidebar&action=raw&templates=expand&usemsgcache=yes', function(data) {
    $('#p-Navigation').html(data);
 
    $(".WikiaPage .subnav li").hover(function() {
        $(this).parent().css({width: $(this).parent().innerWidth()});
 
        if (/opera/i.test(navigator.userAgent)) {
            //innerwidth instead of outerwidth, also a bit less high. 
            $(this).find('ul:first').css({visibility: "visible !important", display: "none", left: $(this).innerWidth(), top: "-25px"}).show(150);
        } else {
            if (/msie/i.test(navigator.userAgent)) {
                //Problems with :first, so let's do it the old way.
                $(this).find('ul').eq(0).css({visibility: "visible !important", display: "none", left: $(this).outerWidth()}).show(150);
            } else {
                $(this).find('ul:first').css({visibility: "visible !important", display: "none", left: $(this).outerWidth()}).show(150);
            }
        }
    }, function() {
        $(this).find('ul').css({visibility: "hidden !important"}).hide();
    });
});

Around Wikia's network

Random Wiki