filter
, wherein you can apply lot of different filter options available in browser. There are currently three categories of filters – Visual filters and Reveal/Blend Transition filters. Multiple filters can be applied to a selector to produce interesting results, with the order of application often playing an important role in the final visual result. Current filters only apply in a visual context, but the extensibility of the property could allow for other capabilities. Hence following code can be used to set opacity of an html element in IE. var opacityValue = 0.5; //make it 50% opaque
myElement.style.filter = "alpha(opacity=" + opacityValue*100 + ")"; // IE
Code language: JavaScript (javascript)
But the above code will not work with other browsers like Firefox, Opera etc. Firefox supports another CSS property called opacity
which controls the opacity of an element. Following javascript function will set the opacity of any html element irrespective of the browser. function setOpacity (myElement, opacityValue) {
if (window.ActiveXObject) {
myElement.style.filter = "alpha(opacity="
+ opacityValue*100 + ")"; // IE
} else {
myElement.style.opacity = opacityValue; // Gecko/Opera
}
}
Code language: JavaScript (javascript)
Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
guys i have used the css thing and its not working. i want to try this code but how do i integrate it in the drop down menu. will u send me an email as well. maketo@neo.co.mu
how to dynamically add jsp database value for jquery+ajax success function
Hi viral how to do this using jquery when we do the slider? do you have any idea.