Difference between revisions of "User:Lexar/Main Page/Template:Benjas/Page.js"

From Team Fortress Wiki
Jump to: navigation, search
(removing stoof)
Line 1: Line 1:
 
$('head').prepend('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>');
 
$('head').prepend('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>');
 
$('#mw-content-text').addClass('main-area');
 
$('#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 id="mobile-ul-main">\
 
<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').append('<li class="clearing"></li>');
 
$('#p-Navigation li').clone().appendTo('#navigation-side ul');
 
$('#navigation-side ul').append('<li class="clearing"></li>');
 
$('#p-tb li').clone().appendTo('#tools-side ul');
 
$('#tools-side ul').append('<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-button',function(){
 
var thi = $(this);
 
if(thi.parent().hasClass('menu-down')) {
 
thi.parent().removeClass('menu-down');
 
}
 
else {
 
thi.parent().addClass('menu-down');
 
}
 
})
 
 
$(document).on('click','#mobile-menu h3',function(){
 
var th = $(this);
 
th.parent('li').toggleClass('down');
 
});
 

Revision as of 11:15, 2 November 2014

$('head').prepend('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>');
$('#mw-content-text').addClass('main-area');