帮助:jQuery UI 可调整大小无法正常工作!
可调整大小的 jQuery UI 演示提供了一个页面: http://jqueryui.com/demos/resizing/ textarea.html
我按照它制作了一个类似的页面:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<style>
.ui-resizable-se {
bottom: 17px;
}
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
handles: "se"
});
});
</script>
</head>
<body>
<div class="demo">
<textarea id="resizable" rows="5" cols="20"></textarea>
</div>
</body>
</html>
但是我的页面中没有句柄图像(右下角的那个)!我将我的代码与示例进行了比较。实际上,除了“包含”js 和 css 文件的标头之外,它们几乎相同。我错过了什么吗?
The jQuery UI Demo for the resizable provides a page: http://jqueryui.com/demos/resizable/textarea.html
And I followed that to make a similar page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<style>
.ui-resizable-se {
bottom: 17px;
}
</style>
<script>
$(function() {
$( "#resizable" ).resizable({
handles: "se"
});
});
</script>
</head>
<body>
<div class="demo">
<textarea id="resizable" rows="5" cols="20"></textarea>
</div>
</body>
</html>
But there's no handle image(the one in the bottom right) in my page! I compared my code with the sample. Actually, they're nearly the same except the header "including" js and css files. Am I miss something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须包含 jquery.ui.core.js (可能还有其他 JS 文件)。
You must include jquery.ui.core.js (and possibly other JS files).
在“jquery-ui-1.8.13.custom.css”文件中删除此“background-image:url(data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=);< /strong>”来自 305 行,它会正常工作:)
inside the "jquery-ui-1.8.13.custom.css" file delete this "background-image:url(data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=);" from line 305 and it will work fine :)