MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
var wnavcontrol = false;
function showNav() {
function showNav() {
   $(".noprint").show();
   $(".noprint").show();
   $('#content').css('margin-left', '10em');
   $('#content').css('margin-left', '10em');
  $('#wnavcontrol').detach();
  var dshow = "<span id='wnavcontrol' onclick='hideNav()' style='float: right; font-weight: bold; color: blue'>-Wiki</span>";
  $('#firstHeading').before(dshow).fadeIn();
}
}


Line 7: Line 12:
   $(".noprint").hide();
   $(".noprint").hide();
   $('#content').css('margin-left', '0em');
   $('#content').css('margin-left', '0em');
  if (wnavcontrol) {
      $('#wnavcontrol').detach();
  }
  var dshow = "<span id='wnavcontrol' onclick='showNav()' style='float: right; font-weight: bold; color: blue'>+Wiki</span>";
  $('#firstHeading').before(dshow).fadeIn();
  wnavcontrol = true;
}
}


onload=function(){
onload=function(){
   $('#firstHeading').wrap('<div style="width: 100%" />');
   $('#firstHeading').wrap('<div style="width: 100%" />');
  var dshow = "<span id='wnavcontrol' onclick='showNav()' style='float: right; font-weight: bold; color: blue'>Wiki+</span>";
 
  $('#firstHeading').after(dshow).fadeIn();
   hideNav();
   hideNav();