lIP TT lIP TT - 3 months ago 7
jQuery Question

Jquery animations works slowly

I have got this html

<div class='obuserposts'>
<div class="obdef">Order By</div>
<div class="nobdef">Number of likes</div>
<div class="nobdef">Number of comments</div>
<div class="nobdef">Upload date(newest first)</div>
<div class="nobdef">Upload date(oldest first)</div>
</div>


and this jquery

$(".obuserposts").click(function(event) {
$(".nobdef").slideDown('400');
});


It works but before working it delays for 1 second.
Jsfiddle: https://jsfiddle.net/24mcn20f/

Answer

In your fiddle css, there are some animations for the classes obuserposts and nobdef. Deleting the following lines results in a smoother transition:

-webkit-transition: .25s;
-moz-transition: .25s;
-ms-transition: .25s;
-o-transition: .25s;
transition: .25s;

Hope it helps.