Javascript 向下滑动后如何展开垂直滚动?
你可以在www.graysonearle.com/Lumarca这里看到它的作用 我已经试了好几个小时来让它工作。。。 我只希望浏览器窗口允许用户在div向下滑动后滚动Javascript 向下滑动后如何展开垂直滚动?,javascript,jquery,Javascript,Jquery,你可以在www.graysonearle.com/Lumarca这里看到它的作用 我已经试了好几个小时来让它工作。。。 我只希望浏览器窗口允许用户在div向下滑动后滚动 $(document).ready(function() { // hides the slickbox as soon as the DOM is ready $('#content').hide(); // toggles the content when you click the right link
$(document).ready(function() {
// hides the slickbox as soon as the DOM is ready
$('#content').hide();
// toggles the content when you click the right link
$('#togglebutton').click(function() {
if ( $(this).hasClass("active"))
{
$('#content').slideDown(200);
$(this).removeClass("active");
$("#toggleimg").attr("src", "images/less.png"); //swap the image
var destination = $("#bottombar").offset().top;
//alert(destination);
//$("html,body").animate({ scrollTop: destination},"slow");
$('html, body').delay('200').animate({
scrollTop: $('#bottombar').offset().top + 111
}, 200);
} else {
$(this).addClass("active");
$("#toggleimg").attr("src", "images/more.png"); //swap the image
$('#content').slideUp(200);
}
event.preventDefault();
return false;
});
});