I'm having a little problem with an operator. I have a number which is either plussed or subtracted depending on key input. The weird thing is that the operators += 1 and += 11 adds the numbers literally to the static number: 60 becomes 601 and 6011 instead of 61 and 71.
Here is the code, so take into consideration that the static number is 60:
switch(e.keyCode) {
case 37:
boxID -= 1;
break;
case 38:
boxID -= 11;
break;
case 39:
boxID += 1; // Becomes 601
break;
case 40:
boxID += 11; // Becomes 6011
break;
}
var boxID = $('li.selected').attr('id');