我知道以前有人问过,但我无法弄清楚为什么可调整大小对我不起作用



我在这里看到了一些关于JQuery中resizeable()函数不起作用的线程,但它们似乎通常不包括css。我加入了CSS,但仍然有问题,我花了几天时间试图弄清楚是什么。有什么帮助吗?简化版:

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"></link>
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script> $(document).ready(function() {
        $(function() { $("#test").resizeable(); }); }); </script>
</head>
<body>
    <img id="test" src="http://i.imgur.com/lrdy4jc.jpg" />
</body>
</html> 

因为方法是.resizable()而不是.resizeable()

对我来说很好…

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"></link>
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script>
    $(document).ready(function() {
        $("#test").resizable();
    });
    </script>
</head>
<body>
    <img id="test" src="http://i.imgur.com/lrdy4jc.jpg" />
</body>
</html> 

ouchy resizable()拼写

最新更新