Here’s my code for the sexy sliding bar, I just want the page to load with it extended (for users with no Javascript).
[code]
var isExtended = 0;
var width = 200;
var height = “100%”;
var slideDuration = 1000;
var opacityDuration = 1500;
function extendContract() {
if (isExtended == 0) {
sideBarSlide(0, height, 1, width);
sideBarOpacity(0, 1);
isExtended = 1;
$(“#sideBarTab”).children().get(0).src = $(“#sideBarTab”).children().get(0).src.replace(/(.[^.]+)$/, “-active$1”)
} else {
sideBarSlide(height, 0, width, 1);
sideBarOpacity(1, 0);
isExtended = 0;
$(“#sideBarTab”).children().get(0).src = $(“#sideBarTab”).children().get(0).src.replace(/-active(.[^.]+)$/, “$1”)
}
}
function sideBarSlide(b, a, c, d) {
$(“sideBarContents”).css({
height: b,
width: c
});
$(“#sideBarContents”).animate({
height: a,
width: d
},
{
queue: false,
duration: slideDuration
},
“linear”)
}
function sideBarOpacity(b, a) {
$(“#sideBarContents”).animate({
opacity: a
},
opacityDuration, “linear”)
}
$(function() {
$(“#sideBarTab”).click(function() {
extendContract();
return false
},
function() {})
});
[
?