javascript - Bootstrap jQuery ui 对话框冲突

标签 javascript jquery html twitter-bootstrap dialog

我试图向我的 Bootstrap 网站添加一个简单的对话框,但我可以做到这一点。我的链接似乎出了问题,因为当我在空白网站(没有 Bootstrap 链接)上测试对话框时,它工作得很好。请看一下我的代码...

请尽可能简单:

<!doctype html>
<html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery UI Dialog - Default functionality</title>

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <link rel="stylesheet" type="text/css" href="jquery-style.css">
    <link rel="stylesheet" href="/resources/demos/style.css">

    <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 src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
      <script>
      $(function() {
        $( "#dialog" ).dialog({
        modal:true,
        show: {effect:"fade",
        duration:250},
        hide: {effect:"fade",
        duration:250}
        });
      });
      </script>
    </head>
    <body>
    </body>
</html>

最佳答案

Stefanos Ioannou,您正在使用 2 个 jquery 版本,为什么您不放置最新的版本。

或者使用 jQuery.noConflict();文档已准备好,这可能会解决您的问题。

关于javascript - Bootstrap jQuery ui 对话框冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31627221/

相关文章:

javascript - 禁用 Fengyuanchen Datepicker jQuery 插件中的特定日期

javascript - 从 jQuery 插件返回 true 或 false

jquery - 根据偏移量逐渐改变不透明度

具有奇偶类的 Javascript DOM 操作

javascript - 我如何处理 react 组件中的事件捕获?

javascript - 安装Electron时如何解决ECONNRESET?

javascript - 如何将鸟类计数数据放入 d3.js 以在谷歌地图上绘制条形图

javascript - 如何在 Android/iOS 上的 webview/移动浏览器中最好地预缓存视频?

javascript - 如何通过使用 JavaScript 单击另一个元素来更改元素的字体?

javascript - Bootstrap 不适用于简单的 html 页面