Quantcast
Channel: Adobe Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 290743

Switch statements in Adobe Edge

$
0
0

Hi, does anyone knows if this switch statement will work? I'm working on it in Adobe Edge. I tried writing the codes in normal switch statement structure. But I don't know why it still wouldn't work. These is just an excerpt of my work. Thank you.

 

 

 

$('.myclass a').click(function()

{

    var cases = ["case1", "case2"];

    var self = $(this);

    for(var i =0, ii = cases.length;i<ii;i++)

    {

        var casesName = cases[i];

        if(self.hasCase(casesName))

        {

            switch(casesName)

            {

                case 'case1':

                alert("Just like the sky!");

               //display the corresponding animation

                case 'case1' = sym.$(".Stage_position1__1Black_Eagle_id");

                break;

               

                case 'case2':

                alert("rainbow!");

                case 'case2' = sym.$(".Stage_position2__5Black_Snake_id"); 

                break; 

 

 

 

 

        }

    }      

};


Viewing all articles
Browse latest Browse all 290743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>