User:Ender01/common.js

$(document).ready(function { setInterval(colorChange, 1000); $(".hpWelcome").siblings.css("display", "none"); $(".hpWelcome").css("display", "block"); number = $(".TWEMTab:last-child").index + 1; sliderWidth = 100 / number; $(".Slider").css("width", sliderWidth + "%");   $(".TWEMTab").click(function(event) { event.preventDefault; var tabClass = $(this).attr("id"); $(tabClass).siblings.css("display", "none"); $(tabClass).fadeIn; tabSection = $(this).index; totalTabs = $(".TWEMTab:last-child").index + 1; tabNumber = (tabSection / totalTabs) * 100; $(".Slider").css("left", tabNumber + "%"); }); });