![]() |
Jquery Effects:Fading Elements | fade in jquery
.fadeIn()
- Jquery fadeIn() shows an element at slowly.
- Display a set of selected elements with the help of a given parameter value or default values.
Syntax
$(selector).fadeIn(speed,easing,callback)
| Parameter | Parameter Type | Parameter Description |
|---|---|---|
| Speed | String, Numbers | Contains "slow","fast" default values and milliseconds-user defined.Ex:200. |
| Easing | String | Give more easy animation to an Html canvas element.Ex:swing, easeOutCubic etc,. |
| Callback | functions (optional parameter) | Passed arguments to other functions when a methods are finised. |
.fadeOut()
- Jquery fadeOut method hides or fades out selected elements to transparent.
- It makes an element invisible but doesn't delete an element.
Syntax
$(selector).fadeOut(speed,easing,callback )
| Parameter | Parameter Type | Parameter Description |
|---|---|---|
| Speed (optional ) | String, Numbers | Contains "slow","fast" default values and milliseconds-user defined.Ex:200. |
| Easing (optional ) | String | Give more easy animation to an Html canvas element.Ex:swing, easeOutCubic etc,. |
| Callback (optional ) | Functions | Passed arguments to other functions when a method is finished. |
.fadeTo()
- Jquery fadeTo() adjusts the opacity of a set of matched elements with given selectors.
- A fadeTo method needs a speed parameter and opacity to makes an element has transparent.
Syntax
$(selector).fadeTo(speed,opacity,callback)
| Parameter | Parameter Type | Parameter Description |
|---|---|---|
| Speed (required) | String, Numbers | Contains "slow","fast" default values and milliseconds-user defined.Ex:200. |
| Opacity (required) | Number | A value between 0 to 1 that fade an element to transparent. |
| Callback (optional) | Functions | Passed arguments to other functions when a methods are finised. |
.fadeToggle()
- Jquery fade toggle() fade a selected element to toggle in a given fading parameter.
- It displays or hides a set of the matched elements to a given parameter value.
Syntax
$(selector).fadeToggle(speed,easing,callback)
| Parameter | Parameter Type | Parameter Description |
|---|---|---|
| Speed (optional ) | String, Numbers | Contains "slow","fast" default values and milliseconds-user defined.Ex:200. |
| Easing | String | Give more easy animation to an Html canvas element.Ex:swing, easeOutCubic etc,. |
| Callback (optional ) | Functions | Passed arguments to other functions when a methods are finised. |
<!DOCTYPE html >
<html lang="en-us">
<head>
<title>Jquery Show method</title>
<meta charset="utf-8" />
<script src="jquery-1.11.1.min.js" type="text/javascript"></script>
</head>
<body>
<p>This is a paragraph that demonstrate a show method</p>
<button class="btn1">hide</button>
<button class="btn2">show</button>
<button class="btn3">toggle</button>
<script type="text/javascript">
$(document).ready(function () {
$(".btn1").click(function () {
$("p").fadeIn(200);
});
$(".btn2").click(function () {
$("p").fadeOut("slow");
});
$(".btn3").click(function () {
$("p").fadeTo("slow",0.7);
});
$(".btn4").click(function () {
$("p").fadeToggle("fast");
});
})
</script>
</body>
</html>
Do you know:-
- How to filter contents with jQuery
- jQuery | Basic filter() with Examples
- Jquery Hierarchy Selectors|Child Selector (“parent > child”)
- [jQuery] attribute Selector
- Jquery | Basic Selectors
- [jQuery] :Even Selector
- Jquery Overview
- How to Retrieve data using dataset in c#
- “Login failed for user” SQLConnection using C#
- How can I prevent the browser back button After Logout
- Calendar Control in c# Windows Application
- Timer tick event in c# windows application
- How to delete record in c# using the connected approach
- [Connect] to Database c# Through Code
- The Command Class | C# | TrickCode
- C# DataReader ADO.NET |Trickcode
- What is disconnected data access?
- how to Adding Parameters to Commands
- SQL Basics?
- What is Database Preparations?
- SQL vs NoSQL or MySQL vs MongoDB
- What is data provider in C#?
- What is connection string C#?
- [SQL] SELECT Statement | Example
- how to get return value from stored procedure in sql server
- how to prevent sql injection attacks
- What is Database? What is SQL?
If you like the tutorial, then please share this tutorial with your friends on social media.


Post A Comment:
0 comments: