MENU
Hiding and Showing
.hide/show/toggle/fadeOut/fadeIn/ slideUp/slideDown/slideToggle( [Number/String duration] [, function() complete]) .hide/show/toggle/fadeOut/fadeIn/fadeToggle/ slideUp/slideDown/slideToggle(Object options) .hide/show/toggle/fadeOut/fadeIn/fadeToggle/ slideUp/slideDown/slideToggle( [Number/String duration] [, String easing] [, function() complete]) .fadeTo(String/Number duration, Number opacity [String easing][, function() complete]) Hide/show the matched elements. |
The object 'options' has the following properties: Number/String duration = number | 'fast' | 'slow'String easing = 'swing' | 'linear'Boolean/String queue = (place in queue or instant?)Object specialEasing = (CSS properties and functions)function(Number now, Tween tween) stepfunction(Promise animation, Number progress, Number remainingMs) progressfunction() completefunction(Promise animation) startfunction(Promise animation, Boolean jumpedToEnd) donefunction(Promise animation, Boolean jumpedToEnd) failfunction(Promise animation, Boolean jumpedToEnd) always |
RESETRUNFULL
<!DOCTYPE html><html><head>
<script src="jquery-3.5.1.min.js"></script></head><body>
<p>A</p>
<p>B</p>
<p>C</p>
<button>Hide / Show </button>
<script>
$('button').click(function(){
$('p').fadeToggle({duration:1000, easing: 'swing'});
});
</script></body></html>