2
我有下面的代码,这使得两个面板由一分段DIV (里克施特拉尔从this great example拍摄)jQuery的调整大小:调整DIV的事件不会被触发
我想分开的大小调整触发重新调整大小事件,但不知何故,这没有注册。任何想法,我在这里失踪?谢谢。
$(".flex-item-top").resizable({
handleSelector: ".splitter",
resizeWidth: false,
resize: function(event, ui) {
console.log("Let's get schwifty!")
}
})
编辑:有点晚了,但我还没有想通了,为什么事件在不触发。 然而,现在我发现通过“拖”的事件,这是我在另一个堆栈溢出后找到了解决办法,也许是有帮助的人:)
var isDragging = false;
$(".splitter")
.mousedown(function() {
isDragging = true;
})
.mousemove(function() {
if (isDragging) {
console.log('hello')
}
})
.mouseup(function() {
isDragging = false;
})