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

Change opacity with mouseover.

$
0
0

Hello. I am creating an application for my website and do not have a ton of experience with coding other than HTML5 and CSS3.

It Adobe Edge Animate I have created my application and have an image I am using as a button. The opacity of the image is 50% by default. I would like the opacity to change to 100% on mouse over and go back to 50% on mouse off. I would also like it to stay 100% if the user clicks on it. Right now I have the mouse over and mouse off working but the problem is that it still goes back to 50% even after I click and hover off. How do I override the mouse off function? The image is called shirtsICO and the current code is as follows:

 

click:

     sym.$("shirtsICO").css("opacity","1");

 

mouseenter:

     sym.$("shirtsICO").css("opacity","1");

 

mouseleave:

     sym.$("shirtsICO").css("opacity",".5");

 

I have been playing around with If statements and couldn't get anything to work. As I mentioned I am not too experienced with javascript.

 

Regards,

Logan Case


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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