User:Zubachi/vector.js
/*
jQuery
TODO
====
- actually make this animate...
$(document).ready(function() {
// console.log("DOM is ready!");
// #mw-panel .portal hidden
// #mw-panel width is 2em
var openWidth = "10em";
var closedWidth = "2em";
var animationDuration = 500;
$("#mw-panel").hover(function() {
// console.log("Hovering.");
$(this).stop().animate({ width: openWidth }, animationDuration);
// console.log("Panel opened!");
$("#content").stop().animate({ marginLeft: openWidth }, animationDuration);
// console.log("Content moved!");
$("#left-navigation").stop().animate({ marginLeft: openWidth }, animationDuration);
// console.log("Nav moved!");
$("#mw-panel .portal").show();
// console.log("You're portals are showing...");
}, function() {
// console.log("Mouse leaving.");
$(this).stop().animate({ width: closedWidth }, animationDuration);
// console.log("Panel closed");
$("#content").stop().animate({ marginLeft: closedWidth }, animationDuration);
// console.log("Content returned");
$("#left-navigation").stop().animate({ marginLeft: "0" }, animationDuration);
// console.log("Nav returned");
$("#mw-panel .portal").hide();
// console.log("Where'd my portals go?");
});
});