Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
单击相应按钮时,我想在各个方向上稍微移动一个 div(单击顶部按钮时移动到顶部,单击左按钮时移动到左侧......等等)。我可以在 jQuery 中做到这一点
请帮助我。在此先感谢...
$('.right').click(function() { $(".wrap").animate({ scrollLeft: "+=50" }, "slow"); return false; }); $('.down').click(function() { $(".wrap").animate({ scrollTop: "+=50" }, "slow"); return false; });
http://jsfiddle.net/3xaPz/1/