User:Diriector Doc 1/common.js

$.when($.ready).then(function{	console.log("hello world")	$(".infobox").each(function(i, e){ e = $(e); function clickFunction(stat){ return (function{				if($(this).parent.attr("active")){					e.find("span.stats").hide					e.find("span.base").show					$(this).parent.attr("active", "").css("background", "initial")				} else {					$('td[active="true"]').attr("active", "").css("background", "initial")					$(this).parent.attr("active", "true").css("background", "green")					e.find("span.stats").hide					e.find("span."+stat).show				}			}) }		e.find('img[alt="Strength"]').click(clickFunction("atk")) e.find('img[alt="Dexterity"]').click(clickFunction("dex")) e.find('img[alt="Defence"]').click(clickFunction("def")) e.find('img[alt="Speed"]').click(clickFunction("spe")) }) });