jquery ui ressized() 不工作

标签 jquery html css jquery-ui

链接到jsFiddle

HTML

<div class="empty ui-widget-content">
    <div class="settings-menu">
    </div>
</div>

CSS

.empty {
    height: 50px;
    display: block;
    float: left;
    position: relative;
    margin: 6px 0;
    width: 100%;
    background: grey;
}

JS

$('.empty').resizable();

为什么,哦,为什么会发生这么基本的事情?

最佳答案

问题是 jQuery 和 jQuery UI 的版本。

从 jQuery 版本 1.9 开始,browser() 方法已被删除。您可以使用不同/旧版本的库来解决问题。

The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.

DEMO

或者,如果您不想使用旧版本的插件,请使用 jQuery Migrate plugin .

关于jquery ui ressized() 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25076767/

相关文章:

javascript - 使用拖放 HTML 上传图片

html - 让背景颜色在 div 上工作

javascript - 我想在 JavaScript 中将鼠标移到图像上时显示文本

javascript - 如何检查 url 是否给定空字符串

javascript - 使用页面滚动条仅滚动特定元素

html - 如何在 css 中将鼠标悬停在父 div 上时设置子 div 的高度?

jquery - 每次页面展开时自动将 div 调整为页面宽度

javascript - 看不到 JS 的问题

javascript - 如何在一个 html 页面上应用两个 svg?

html - 滚动修复 : a:hover + links in div not working any more because other div's margin is on top of that div