I have one question about CSS hide transition using jquery hide function.
I have created this DEMO from codepen.io
In this demo you can see the show button. When you click the show button then .test and .user-image div opening with CSS transition effect .
I want to make it when clicked hide button then the .test div hide with CSS transition effect.
Anyone can tell me a little example how can i do that ?
CSS
<div class="container">
<div class="usr">Show</div>
<div class="test">
<div class="hide">Hide</div>
<div class="user-image" style="background-image:url(...);"></div>
</div>
</div>
JS
$(document).ready(function() {
$('.usr').click(function() {
$(".test").show();
});
$(".hide").click(function() {
$(".test").hide();
});
});
.test1content. And it will work even with Javascript disabled. It demonstrates a technique that you can apply in many cases once understood!$(".test").show(500); $(".test").hide(500);