css - jquery fade out sliding left -
i want make divs fade out , sliding left @ same time, dismissing notification cards on android.
i searched , found 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 code makes div(#book) fade out sliding up, not left (or right). read document .animate() couldn't find how that.
check if helps
$(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 slide left panel</div> <div id="panel">hello world!</div>
Comments
Post a Comment