javascript - Jquery-ui 可调整大小的插件不起作用

标签 javascript jquery jquery-ui jquery-resizable

我究竟做错了什么?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Draggable crop</title>
        <script type="text/javascript" src="/scripts/jquery.js"></script>
        <script type="text/javascript" src="/scripts/jquery.ui.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('.image_outline').resizable();
            });
        </script>

        <style type="text/css">
            .image_outline {
                border: dashed 1px #000;
                width: 300px;
                height: 200px;
            }
        </style>
    </head>

    <body>
        <div class="image_outline"></div>
    </body>
</html>

这是 jsfiddle 上的代码:http://jsfiddle.net/dAHt8/

为什么可调整大小的插件不能使 div 可调整大小?

最佳答案

添加正确的 CSS 链接后工作正常:

jsFiddle example .

对于那个 jsFiddle,我链接到托管的 jQuery UI CSS:http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css

关于javascript - Jquery-ui 可调整大小的插件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10742980/

相关文章:

javascript - mongoose/mongodb 计算统计数据的最佳方法

javascript - 实时 : Websockets vs Comet

javascript - express - 末尾可选斜杠

javascript - 如何向音乐视频网站添加下载按钮

jquery - 根据li标签的组合宽度动态设置ul的宽度

javascript - 更新客户端 Javascript 游戏视口(viewport)

javascript - JQuery UI 可排序连接列表示例的 y 滚动列有问题

javascript - 为什么我的航点销毁函数调用会抛出错误?

javascript - 即使正确导入,jqGrid 也不可用

javascript - jQuery EasyUI : confirmation on close window