How do I figure out if a variable is divisible by 2? Furthermore I need do a function if it is and do a different function if it is not.
You can use the modulus operator like this, no need for jQuery. Just replace the alerts with your code.
alerts
var x = 2; if (x % 2 == 0) { alert('even'); } else { alert('odd') }