User:Lhealt/vector.js

$(document).ready(function{	var toc = $('#toc');	var content = $('#mw-content-text');	var bodyWidth=$('body').width;	var mwHead = $('#mw-head');	var mwNav = $('#mw-navigation');	var content = $('#content');	$('#content').before($('#togglelink'));

var toggleOff = function { toc.hide('slow'); content.css('width', '98%'); $('#togglelink').css({			'background': '#4B82BF',			'color': 'white'			}); $('#firstHeading').css({			'width': '98%',			'left': '1%'		}); $('#catlinks').css('width', '101%'); };	var toggleOn = function { toc.show('medium'); content.css('width', '82%'); $('#togglelink').css({			'background': 'silver',			'color': '#4B82BF'			}); $('#firstHeading').css({			'width': '80%',			'left': '19%'		}); $('#catlinks').css('width', '82%'); };	// If there is no #toc sidebar, content width 100% if (toc.length===0){ content.css('width', '98%'); $('#firstHeading').css({			'width': '98%',			'left': '1%'		}); $('#catlinks').css('width', '100%'); }	// Fixing bug on refresh where contents are hidden if ($('#togglelink').html==='show'){ $('#togglelink').trigger('click'); }	// When clicking on toggle button $('#togglelink').on('click', function{		toggleStatus=$('#togglelink').html;		if (toggleStatus==="hide"){			toggleOn;		} else if (toggleStatus==="show") {			toggleOn;		}	});

function header{ mwNav.insertBefore(content); }

});