Can anyone tell me why the conditional in my code is never true?
It's because I was checking a string against a number and needed to use
You need to
$('.zeppelin').css('right') > winWidth
$('.zeppelin').css('right') will return
[integer]px. Therefore you are comparing a string type to an integer type.
parseInt($('.zeppelin').css('right')) > winWidth
Also, as a side note, looking through your code, you have:
If you wish to invert an integer, multiply it by