SlideDown div with anchor click then go to link

I want the jquery div to slide down on click of the anchor tag, which works, but I want it to animate first and then click on the clicked link. Is it possible?

   $('#portfolio').click(function() {
        $('#bodyG').slideUp('fast');
        });

      

+3


source to share


1 answer


$('#portfolio').click(function(e){
  e.preventDefault();
  var href = $(this).attr('href');
  $('#bodyG').slideUp('fast', function() {
    window.location = href;
  });
});

      



+4


source







All Articles