jquery fade out sliding left

Junsung Park

I want to make some divs fade out and sliding left at the same time, which is much like dismissing notification cards on Android.

I searched and found some jquery codes.

$('#clickme').click(function(){   
$('#book').animate({
      opacity: 'hide', // animate slideUp
      margin: 'hide',
      padding: 'hide',
      height: 'hide' // animate fadeOut
    }, 'slow', 'linear', function() {
      $(this).remove();
    });
});

but this code makes the div(#book) fade out with sliding up, not left (or right). I read the document about .animate() but I couldn't find how to do that.

MKD

check if this helps you

$(document).ready(function(){
    $("#flip").click(function(){
        $("#panel").hide("slide", { direction: "left" }, 1000);
    });
});
#panel, #flip {
    padding: 5px;
    text-align: center;
    background-color: #e5eecc;
    border: solid 1px #c3c3c3;
}

#panel {
    padding: 50px;
    display: block;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> 
<div id="flip">Click to slide left panel</div>
<div id="panel">Hello world!</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

jquery fade out sliding left

From Dev

Jquery Fade in Fade out

From Dev

JQuery text fade in fade out

From Dev

Slideshow: Fade in and Fade out on JQuery

From Dev

Text fade in and out jquery

From Dev

Fade div in and out with JQuery

From Dev

jQuery fade in/out is not working?

From Dev

Jquery sliding left menu with icon

From Dev

Jquery fade in, fade out some elements together

From Dev

jQuery Fade in / Fade out divs with variable timing

From Dev

jQuery .fadeTo() -- Fade back in after fade out

From Dev

Fade in Fade out inside the bar using jquery

From Dev

Jquery fade in, fade out some elements together

From Dev

jquery fade in then fade out automatically once

From Dev

jQuery Fade in / Fade out divs with variable timing

From Dev

slide in and out transition for sliding left menu

From Dev

How to fade out an image from right to left?

From Dev

simple fade in and out of images with arrow left and right

From Dev

jQuery Fade In / Fade Out Text, then Fade In new text

From Dev

Fade divs in and out on jQuery scroll

From Dev

Fade in and out when scrolling with jquery

From Dev

JQuery fadeIn fade Out issue

From Dev

Moving elements with jQuery - Fade out then in?

From Dev

JQuery Div Fade in and out on change

From Dev

jquery fade out and on click function

From Dev

Jquery fade in and out with mouseover not working

From Dev

Jquery Fade In/Out Scroll Formula

From Dev

Sliding from right to left vertical Menu > Jquery

From Dev

Fade in / fade out background color of an HTML element with Javascript (or jQuery)