javascript - Remove transparency from text when clicking a particular div element. -
# popup_box 2 {_position: absolute; / * Internet Explorer 6 * / height for height: 350px; Width: 600px; Background: #FFFFFF; Left: 33%; / * 300px; * / Right: 30%; Text-align: left; Top: 150px; Z-index: 100; / * Layering (at the top of the other), if you have multiple layers: I only max, you can change it automatically * / margin-left: 0; / * Additional features can be omitted * / padding: 15px; Font-size: 15px; -moz-box-shadow: 0 15px # ff0000; -WebKit box-shadow: 0 15px # ff0000; Box-Shadow: 0 15 Px Lighthouse; Background color: RGBA (255, 255, 255, 0.9); / * Alpha 0.9 * / white with filter: alpha (opacity = 50); Opacity: 0.5; }
After clicking on a particular div
, the transparency effect should be removed and the text will be clearly visible.
One way to do this and add a class ...
# popup_box2 {_position: absolute; / * Internet Explorer 6 * / height for height: 350px; Width: 600px; Background: #FFFFFF; Left: 33%; / * 300px; * / Right: 30%; Text-align: left; Top: 150px; Z-index: 100; / * Layering (at the top of the other), if you have multiple layers: I only max, you can change it automatically * / margin-left: 0; / * Additional features can be omitted * / padding: 15px; Font-size: 15px; -moz-box-shadow: 0 15px # ff0000; -WebKit box-shadow: 0 15px # ff0000; Box-Shadow: 0 15 Px Lighthouse; Background color: RGBA (255, 255, 255, 0.9); / * Alpha 0.9 * /} # popup_box2.filter {white color with filter: filter: alpha (opacity = 50); Opacity: 0.5; / * Or CSS item that you want to do * /}
add filter
$ ('elementselectorHERE'). Click (function () {$ ('# popup_box2'). AddClass ('filter');});
Remove filter
$ ('elementselectorHERE'). Click (function () {$ ('# popup_box2'). RemoveClass ('Filter');});
Comments
Post a Comment