EDIT: Endless thanks to @Arsh with helping me to figure it out. Now it works like a charm. I addded some CSS transitions for better look, hope this thread will help someone in future :)
Working fiddle you can find here: http://jsfiddle.net/4bkzdrve/
Original question and resolving:
I have iframe youtube video and already have set default opacity to 0.3 and onhover 1.0. I want iframe detect onlick event and then set opacity to 1.0 even if mouse won´t be on iframe area. I tried everything but without success. Here´s some markup:
CSS:
iframe.video{
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=30);
-moz-opacity: 0.3;
-khtml-opacity: 0.3;
opacity: 0.3;
transition:all 1s linear;
-o-transition:all 1s linear;
-moz-transition:all 1s linear;
-webkit-transition:all 1s linear;}
iframe.video:hover{
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
-moz-opacity: 1;
-khtml-opacity: 1;
opacity: 1;}
HTML:
<iframe class="video" width="500" height="300" src="https://www.youtube.com/embed/YjWIAOsndu4" frameborder="0" allowfullscreen></iframe>
If possible, I would like to have solution also for mobile devices, but not necessary. Thank you in forward for helping me out