1
我一直在使用JQuery UI ui.Draggable。 而当我滚动该段时,div在与其父元素同时拖动。 任何人都可以帮助我如何临时禁用拖动滚动?滚动时不希望的拖动
<div class="note">
<p>
Lorem Ipsum is simply dummy text of the printing
and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap
into electronic typesetting, remaining essentially
unchanged. It was popularised in the 1960s with the
release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus
PageMaker including versions of Lorem Ipsum.
</p>
</div>
$(function(){
var str = "div.note";
var el = $(str);
var er = $(str+' p');
$this = er;
el.draggable().resizable();
el.bind('resize', function(){
var node = $(this);
var size = Math.pow(node.width(),2) + Math.pow(node.height(),2);
size = Math.sqrt(size);
node.css({'font-size':(size/2)+'%', 'padding':(size/24)+'px'});
});
});
问候
我试过的jsfiddle你的榜样,我不能看看问题是什么:http://jsfiddle.net/s65UR/ 你可以做一个,所以我们可以尝试吗? – BiAiB
你的例子中有问题。抓住滚动线,而不是滚动,你拖着马车滚动!在这里,更大的div更容易注意http://jsfiddle.net/s65UR/1/ – kidwon