Instead of using two buttons we can use single button to get the same output. We will be changing the text of the label written over the button and will match it to use the show or hide effect.
Adding speed of transition
We can add optional parameter to speed up or slow down the transition from show to hide or hide to show. We can add these three choice as option.
slow
fast
Time in milliseconds
To slow the displaying of div layer
$('#d1').show('slow');
To fast the hide of div layer
$('#d2').hide('fast');
To add 5000 milli seconds delay
$('#d3').show(5000);
We can combine the effects of show hide and use one effect toggle(). This will hide the display element and show the hidden element.
This article is written by plus2net.com team.
plus2net.com
TEJAS PRAJAPATI
27-02-2018
this is easy example for the code is maintained and than each other