Difference between revisions of "User:Lexar/Main Page/Template:Benjas/Page.js"
Line 17: | Line 17: | ||
</ul>'); | </ul>'); | ||
$('#p-personal li').clone().appendTo('#personal-side ul') | $('#p-personal li').clone().appendTo('#personal-side ul') | ||
− | $('# | + | $('##personal-side ul').after('<li class="clearing"></li>'); |
− | $('#p-Navigation li').clone().appendTo('#navigation-side ul | + | $('#p-Navigation li').clone().appendTo('#navigation-side ul'); |
− | $('# | + | $('#navigation-side ul').after('<li class="clearing"></li>'); |
− | $('#p-tb li').clone().appendTo('#tools-side ul | + | $('#p-tb li').clone().appendTo('#tools-side ul'); |
− | $('# | + | $('#tools-side ul').after('<li class="clearing"></li>'); |
$('#p-namespaces ul li').clone().appendTo('#menu-768 ul'); | $('#p-namespaces ul li').clone().appendTo('#menu-768 ul'); |
Revision as of 10:30, 14 July 2014
$('head').prepend('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>'); $('#mw-content-text').addClass('main-area'); $('body').prepend('<div id="mobile-menu"><div class="mobile-menu-button"></div></div><div id="menu-768"><span>Menu</span><ul></ul></div>'); $('#p-search').clone().appendTo('#mobile-menu'); $('#mobile-menu').append('<ul>\ <li id="personal-side"><h3><span>Account</span></h3><ul></ul><div class="clearing"></div></li>\ <li class="clearing"></li>\ <li id="navigation-side"><h3><span>Navigation</span></h3><ul></ul><div class="clearing"></div></li>\ <li class="clearing"></li>\ <li id="tools-side"><h3><span>Tools</span></h3><ul></ul><div class="clearing"></div></li>\ <li class="clearing"></li>\ <li id="tf2-side"><h3><a href="#">Team Fortress 2</a></h3></li>\ <li class="clearing"></li>\ <li id="tfc-side"><h3><a href="#">Team Fortress Classic</a></h3></li>\ <li class="clearing"></li>\ <li id="vwn-side"><h3><a href="#">Valve Wiki Network</a></h3></li>\ </ul>'); $('#p-personal li').clone().appendTo('#personal-side ul') $('##personal-side ul').after('<li class="clearing"></li>'); $('#p-Navigation li').clone().appendTo('#navigation-side ul'); $('#navigation-side ul').after('<li class="clearing"></li>'); $('#p-tb li').clone().appendTo('#tools-side ul'); $('#tools-side ul').after('<li class="clearing"></li>'); $('#p-namespaces ul li').clone().appendTo('#menu-768 ul'); $('#p-views ul li').clone().appendTo('#menu-768 ul'); $('#p-cactions ul li').clone().appendTo('#menu-768 ul'); $('#p-views ul li, #p-namespaces ul li').addClass('collapsible').css('display','block'); $(document).on('click','#mobile-menu h3 span',function(){ var th = $(this); $('#mobile-menu h3 span').closest('li').removeClass('down'); if(th.closest('li').hasClass('down')) { th.closest('li').removeClass('down'); } else { th.closest('li').addClass('down'); } });