jquery resizable(),新建元素后之前的元素无法伸缩的问题 15
<!doctypehtml><htmllang="en"><head><metacharset="utf-8"/><title>jQueryUIResizable-Def...
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Resizable - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable();
});
document.ondblclick = createDiv;
function createDiv(){
document.getElementById("1").innerHTML += "<div>aaa</div>";
}
</script>
</head>
<body id = "1">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Resizable</h3>
</div>
</body>
</html>
用官网的例子改的,双击页面创建新的元素,然后创建完了之后本来可以调整大小的元素就不能调整大小了,求问怎么解决 展开
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Resizable - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable();
});
document.ondblclick = createDiv;
function createDiv(){
document.getElementById("1").innerHTML += "<div>aaa</div>";
}
</script>
</head>
<body id = "1">
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Resizable</h3>
</div>
</body>
</html>
用官网的例子改的,双击页面创建新的元素,然后创建完了之后本来可以调整大小的元素就不能调整大小了,求问怎么解决 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询