I want to create a var which changes it’s value on click and then I want to check the value of the var using if and preform a series of animations. If the value of the var isn’t lets say projects I use else to reverse the animations.
var url = "work";
if (url == "home") {
$("#homeBox").fadeIn(200)
}
$("#homeTab").click(function(){
var url = "home"
})
I will use this for a one-page website so the var values are basically the urls.
Thanks
If I understood what you need, this would solve it:
Hope this helps. Cheers