Teatarea/Textbox/任何不包括DIV的元素(DIV可拖动和可调整大小)都不起作用。我做错什么了吗?
以下是我的简单代码:
<input type="text" id="test"/>JQUERY
$("#test").resizable();
$("#test").draggable({
cancel: '',
containment: "parent"
});上面的陈述对我来说没问题。有人能给我一些建议吗。
编辑:
发布于 2015-05-13 05:51:45
如果您能够提供jsfiddle,也可以添加上述代码insode文档就绪,这将是有帮助的。
$(function(){
$("#test").resizable();
$("#test").draggable({
cancel: '',
containment: "parent"
});
});发布于 2015-05-13 06:13:24
演示Fiddle
我想这就是你需要的东西。希望能帮上忙。看看小提琴。谢谢。
HTML:
<section id="container" class="ui-widget-content">
<h3 class="ui-widget-header">Containment</h3>
<span id="draggable">*
<input type="text "id="resizable" class="ui-state-active" value="This is input box">
</span>
</section>Javascript:
$(function() {
$( "#resizable" ).resizable({
containment: "#container"
});
$( "#draggable" ).draggable({containment: "#container"});
});https://stackoverflow.com/questions/30206545
复制相似问题