什么是一个很好的JS库,可以调整大小?
I'd like to make a textarea resizable. I tried out jQuery UI's "resizable" functionality, but, much as I love jQuery, the resizable thing isn't quite there yet. I want the textarea to resize heightwise only, via a handle at the bottom-center. jQuery lets you resize heightwise only, but evidently doesn't let you place a handle anywhere other than lower right corner, despite what the docs say.
我想让textarea可以调整大小。我尝试了jQuery UI的“可调整大小”功能,但是,就像我喜欢jQuery一样,可调整大小的东西还没有完全存在。我希望textarea仅通过底部中心的手柄高度调整大小。 jQuery只允许你在高度上调整大小,但显然不会让你在右下角以外的任何地方放置句柄,尽管文档说的是什么。
Does anyone know of an alternate library for this functionality?
有没有人知道这个功能的备用库?
5 个解决方案
#1
Are you sure about this? The handles option worked fine for me.
你确定吗?句柄选项对我来说很好。
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href="css/ui-lightness/jquery-ui-1.7.2.custom.css"
rel="stylesheet" type="text/css">
</head>
<body>
<div id="welcome" class="ui-widget-content">Hello, world!</div>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#welcome").resizable({ handles: "n, s" });
});
</script>
</body>
</html>
You can style the ui-resizable-handle, ui-resizable-s, and ui-resizable-n classes.
您可以设置ui-resizable-handle,ui-resizable-s和ui-resizable-n类的样式。
更多相关文章
- req.files.upload.length返回文件计数为零,或上传多个文件,当一个
- 谷歌映射API v3: InfoWindow大小不正确
- 如何在HTML页面中维护SWF文件的大小?
- Python中字符大小写的问题
- 使用python api递归计算每个Dropbox文件夹大小
- Django i18n:为{% blocktrans %}块推荐的大小和格式?
- 获取Linux 内存页大小的命令
- Linux系统下查看目录大小
- linux下mysql表名大小写敏感问题