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类的样式。

更多相关文章

  1. req.files.upload.length返回文件计数为零,或上传多个文件,当一个
  2. 谷歌映射API v3: InfoWindow大小不正确
  3. 如何在HTML页面中维护SWF文件的大小?
  4. Python中字符大小写的问题
  5. 使用python api递归计算每个Dropbox文件夹大小
  6. Django i18n:为{% blocktrans %}块推荐的大小和格式?
  7. 获取Linux 内存页大小的命令
  8. Linux系统下查看目录大小
  9. linux下mysql表名大小写敏感问题

随机推荐

  1. android 中的线性布局与相对布局
  2. 如何将这些Twitter bootstrap 3导航栏链
  3. Ubuntu的FireFox无法使用HTML5播放器的解
  4. 使用HTML5 canvas做地图(3)图片加载平移放
  5. html——ul、li导航栏居中的两种办法
  6. 如何使用CSS精灵重复背景图像?
  7. 前端html数组去重的方法
  8. 多文件拖拽上传以及利用Jquery替代HTML5
  9. html5 地理位置定位的时候,想用enableHigh
  10. HTML5小试 双人贪吃蛇