SCRIPT438:对象不支持属性或方法'可调整大小'

时间:2017-02-10 08:42:25

标签: javascript jquery css modal-dialog

我有一个页面,我需要显示一个模态。我想让它重新变大,但它不起作用。以下是所有导入的js / css文件

<script src='<%= RootPath + "/Scripts/jquery-2.0.3.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/App.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/libs/bootstrap.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/libs/bootbox.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/libs/bootstrap-modal.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/libs/bootstrap-transition.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/icheck/jquery.icheck.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/select2/select2.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/tableCheckable/jquery.tableCheckable.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/libs/raphael-2.1.2.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/morris/morris.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/sparkline/jquery.sparkline.min.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/demos/dashboard.js" %>'></script>
<script src='<%= RootPath + "/Content/BootStrap/js/plugins/datepicker/bootstrap-datepicker.js" %>'></script>
<script src='<%= RootPath + "/Scripts/jquery-migrate-1.2.1.min.js" %>'></script>
<script src='<%= RootPath + "/JS/Bootstrap.common.js" %>'></script>


<link rel="stylesheet" href="../Content/BootStrap/css/font-awesome.min.css">
<link rel="stylesheet" href="../Content/BootStrap/css/bootstrap.min.css">
<link rel="stylesheet" href="../Content/BootStrap/css/bootstrap.min.css.css">
<link rel="stylesheet" href="../Content/BootStrap/js/plugins/icheck/skins/minimal/blue.css.css">
<link rel="stylesheet" href="../Content/BootStrap/js/plugins/fullcalendar/fullcalendar.css">
<link rel="stylesheet" href="../Content/BootStrap/js/plugins/fullcalendar/fullcalendar.css">
<link rel="stylesheet" href="../Content/BootStrap/js/plugins/datepicker/datepicker.css.css">
<link rel="stylesheet" href="../Content/BootStrap/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="../Content/BootStrap/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css.css">

js代码就像

<script type="text/javascript">
    $('.modal-content').resizable({
        //alsoResize: ".modal-dialog",
        minHeight: 300,
        minWidth: 300
    });
    $('.modal-dialog').resizable({
        //alsoResize: ".modal-dialog",
        minHeight: 300,
        minWidth: 300
    });
    $('.modal-dialog').draggable();
</script>

它有什么问题?

2 个答案:

答案 0 :(得分:2)

resizable()draggable()是jQueryUI库的方法;它们不是标准jQuery的一部分。

要解决您的问题,您需要在页面中添加对jqueryui.js的引用。

答案 1 :(得分:0)

我遇到了同样的错误,结果是该网站在_Layout.cshtml基本页面中进行了一些设置,用不正确的程序集替换了我最新的jQuery程序集。

_Layout.cshtml或您使用的任何基础页中检查以下部分以及任何其他参考:

<environment include="Development">...
<environment exclude="Development">... 

那些人在擦我正确的程序集,从而导致这些错误。