JqueryUI Draggable滚动在iframe内部无法正常工作

时间:2017-04-19 06:36:52

标签: javascript jquery html css jquery-ui

您可以帮我在向下拖动元素时启用向下滚动,因为在没有鼠标的情况下向下滚动时iframe不起作用。

		#iframeBox{
			height:5000px;

		}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	
<div style="height: 178px; border: 1px solid #000;">

</div>



    <div id="container2">
      <iframe id="iframeBox" src="http://slm-promo.web.sd-svc.net/COA0036/coateschallenge"  width="100%" scrolling="no">
    </iframe>
    </div>




	

<div style="height: 1000px; border: 1px solid #000;">


</div>

您可以点击整页并尝试向下拖动图片,这是代码。

	$(".draggables .item-container .item").draggable({
		revert: "invalid", 
		containment: "#selection",
		helper: "clone",
		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 );
		}
	});
	

0 个答案:

没有答案