This control of jquery is used for changing opacity of a web
control.This decrease opacity of control. Opacity is mainly compared by
control's current opacity.
If current opacity is high then this function decrease that to zero.
Situation
We have some text that is visible (opacity High) and if user click on a button then it becomes unvisible (opacity becomes Low).
Solution
- First identify source who generate event(above situation mouse click)
- Secon identify target on which we want to apply this effect.
- Use jquery showhide.js for implementing this task
- use jquery http://www.programmingduniya.com/common/jquery/showhide.js
If your click button i will become unvisible.
Syntex for animate()
$("#target_id").fadeOut(time-to-animate);
Points
- we can give time in numeric form ex 100 or 1000
- Standard string form "slow","fast"
<html>
<head>
<style>
span { background-color:green;color:white;padding:10px;font-size:15px; }
</style>
<script src="http://www.programmingduniya.com/common/jquery/showhide.js"> </script>
</head>
<body>
<button id="btnclick2">See Magic</button>
<span id="hide1">If your click button i will become unvisible.</span>
<script>
$("#btnclick2").click(function () {
$("#hide1").fadeOut(3000);
});
</script>
</body>
</html>
No comments:
Post a Comment