【发布时间】:2017-07-06 08:51:11
【问题描述】:
无论如何,是否可以在 iframe 内启用可拖动的 jquery 滚动? scroll: true 不起作用或 iframeFix 在您使用鼠标中键滚动时起作用,但如果您使用左键单击一直向下拖动它不起作用,您能帮帮我吗?
$(".draggables .item-container .item").draggable({
revert: "invalid",
containment: "#selection",
helper: "clone",
iframeFix: true,
scroll: true,
scrollSensitivity: 100,
scrollSpeed: 100,
cursor: "move",
});
$(".droppables .item-container .item").droppable({
accept: ".draggables .item-container .item",
classes: {
"ui-droppable-active": "ui-state-active",
"ui-droppable-hover": "ui-state-hover"
},
drop: function( event, ui ) {
insertItem(this, ui.draggable );
}
});
<div style="height: 178px; border: 1px solid #000;"></div> <iframe src="index.html?formForward=LOAD&t_mm=02&t_dd=27&t_hh=12&t_min=01" onload="resizeIframe(this);parent.scroll(0,0);" height="2000" style="border-width: 0px; height: 2000px;" width="100%" scrolling="auto">
</iframe><div style="height: 1000px; border: 1px solid #000;">
【问题讨论】:
标签: javascript jquery html jquery-ui iframe