Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Hide Show toggle issue - can u help?

$
0
0

Hi, I have a toggle issue!

 

I have four buttons that each hide show toggle different squares:

 

button 1 shows yellow and hides green, green1 and blue

button2 shows green and hides yellow, green1 and blue

button3 shows green 1 and hides yellow, green and blue

button4 shows blue and hides yellow, green and green1


However, if you press button1 and then press button2 the sequence gets confused and hides/shows the wrong ones!

 

Can you help to ensure that whatever button is pressed it will hide show the correct formation whether you toggle or not?

 

here is my code for one button1 etc:

 

// Set a toggle to hide or show an element

if (sym.$("Green").is(":visible")) {

  sym.$("Green").hide();

} else {

  sym.$("Green").show();

}

 

 

// Set a toggle to hide or show an element

if (sym.$("Green1").is(":visible")) {

  sym.$("Green1").hide();

} else {

  sym.$("Green1").show();

}

 

 

// Set a toggle to hide or show an element

if (sym.$("Blue").is(":visible")) {

  sym.$("Blue").hide();

} else {

  sym.$("Blue").show();

}

 

Can you help?


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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