I would like to make an effect like : click a button, and the top div will hide, then bottom div will scroll from top to bottom.
I have finished hide the top div, but it's failed to make the bottom div getting down (?
I think maybe it's because my css and js get something wrong (?), but I'm not sure, and I've modified several times. = (
Here's my javascript code:
$(function(){
$("#btn1").click(function(){
$(".slot-top").hide();
$("#slot ul").animate({ top: "0em" },1500);
return false;
});
});
Here's my code: https://jsfiddle.net/b1mj1c1L/
You messed up the jQuery Selector. Instead of $("#slot ul").animate({ top: "0em" },1500);
use $(".slot").animate({ top: "0em" },1500);
. See here: https://jsfiddle.net/b1mj1c1L/1/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments