0

I was wondering if I could fadeout as well as slide the flash notification but that only one that works is the fadeOut. What can I do?

$(document).ready(function() {

            setTimeout(function(){
                $('#flash_wrapper').fadeOut("slow", function() {
                    $(this).remove();
                      })
                }, 4500);
            });

      </script>

I want to be able to use slideUp and FadeOut at the same time. How do I do that? I still dont know how to get these to work

JamesRocky
  • 721
  • 9
  • 23
  • possible duplicate of [fadeOut() and slideUp() at the same time?](http://stackoverflow.com/questions/2387515/fadeout-and-slideup-at-the-same-time) – D4V1D May 31 '15 at 06:45

1 Answers1

2

You can use jQuery's .animate() to animate CSS properties:

$('#flash_wrapper').animate({
        height: 0, // like slideUp
        opacity: 0 // like fadeOut
    },
    4500, // speed
    function () { // called when animation is complete
        $(this).remove();
    });
Rudi
  • 2,987
  • 1
  • 12
  • 18