I have a functions as follows
var selectionName = [
"CatOne100", "CatOne200", "CatOne300", "CatOne400", "CatOne500",
"CatTwo100", "CatTwo200", "CatTwo300", "CatTwo400", "CatTwo500",
"CatThree100", "CatThree200", "CatThree300", "CatThree400", "CatThree500",
"CatFour100", "CatFour200", "CatFour300", "CatFour400", "CatFour500",
"CatFive100", "CatFive200", "CatFive300", "CatFive400", "CatFive500",
"CatSix100", "CatSix200", "CatSix300", "CatSix400", "CatSix500"
];
var questionCount = 0;
var divName = "";
var answerDivName = "";
var answerShadowDivName = "";
var categoryUpdate = "";
var amount = 0;
var category = "";
var categoryAmount = "";
var selection = "";
window.onload = function() {
for (i=0; i < selectionName.length, i++) {
selection = selectionName[i];
$("#" + selection).bind("click", { sName: selection}, makeSelection );
}
function startGame() {
$("#startPage").css("z-index", 0);
$("#mainPage").css("z-index", 110);
$("#sidebarLeft").css("z-index", 110);
$("#sidebarRight").css("z-index", 110);
$("#gameTitle").css("z-index", 120);
$("#gameTitle").animate({
left:'-=1240px',
top:'+=1075px'
},'slow');
$("#main, #sidebarLeft, #sidebarRight, #gameTitle").bind("click", showGameboard
}
OK, I'll go to JSFiddle at some point here, but the issue I am having is that when it steps through a supposed String, it treats it like it is stepping through an array, by going through all previous values of it. I've tried nulling the string and just "" erasing it. Somehow it keeps all the previous calls through the variable.