I have a variable called 'age' and am trying to work out if it is between two numbers. In this case I want to find out if the age is between 30 and 80.
I have this so far...
if (age >= 30 && age <= 80) {
$('.display').each(function () {
$(this).css('display', '');
});
}
This works great if the age is below 30 then the .display div does not get displayed, but the last part where it checks if the number is less than 80 does not work.
Can anyone point me in the direction of a similar function I can read up on? Or am I doing something obvious wrong?