JQuery slideup and slidedown is not smooth enough

Matt Elhotiby picture Matt Elhotiby · Jul 12, 2010 · Viewed 23.7k times · Source

I am implementing a slide dropdown and i am using this code

$(document).ready(function(){
    $('.drop').click(function(){
        var $next = $(this).parent().next('li.drop_down');
        if($next.is(':visible')) {
            $next.slideUp();
        } else {
            $next.slideDown();
        }
    });
});

but the client claims that it is not smooth enough. He wants to expand really smooth, so is there a way to make it smoother

Answer

Sarfraz picture Sarfraz · Jul 12, 2010

You might want to incorporate the easing plugin for smoother animation.