是否可以实现通过在元素内部滚动(悬停在元素上然后滚动)触发的 jQuery 可调整大小(DOM)元素。
问问题
110 次
1 回答
1
当然,但是实施是创造力的问题。这是我的快速解决方案,您应该对其进行一些工作以满足您的确切需求。
var resizing = false;
var lastScroll = 0;
$("#resizable").hover(function(){ resizing = true; }, function(){ resizing = false; })
.scroll(function(e){
var currentScroll = $(this).scrollTop();
if(tempScrollTop < currentScrollTop) {
// the user is scrolling down
$(this).height("+=10"); // or whatever
}
lastScroll = currentScroll;
});
于 2012-11-27T15:05:15.687 回答