خرید بک لینک
Hi,

I am testing javascript since some days. Right now I am working on a website. I want to do a if statement but it isnt working, I don't know why. Can someone help me ?

Code:

    <script>
        var whichone = "people";
            $(".stretcharrowright").click(function(){
                if(whichone == "people"){
                    $(".informationtext1").toggleClass("information1textanimated");
                    var whichone = "tree";
                } else if(whichone == "tree"){
                    $(".informationtext2").toggleClass("information2textanimated");
                    var whichone = "history";
                } else if(whichone == "history"){
                    $(".informationtext3").toggleClass("information3textanimated");
                    var whichone = "map";
                } else if(whichone == "map"){
                    $(".informationtext4").toggleClass("information4textanimated");
                    var whichone = "people";     
                }
            });
        </script>

Thanks for helping (sorry for my bad english)

برچسب: نویسنده: آیلین رضوانی تاريخ: شنبه 20 خرداد 1396 ساعت: 4:51

صفحه بندی