简体   繁体   English

jQuery可调整大小无法在aspx页面中工作

[英]jquery resizable not working in aspx page

I just can't figure out why this is not working. 我只是不知道为什么这不起作用。 Been stuck on this for a while now. 现在被卡住了一段时间。 All help is appreciated, thanks in advance. 感谢所有的帮助,在此先感谢。

Here is my aspx page: 这是我的aspx页面:

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>  
    <script type="text/javascript" src="Scripts/ui-bootstrap-tpls-0.11.2.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
    <script src="//cdn.ckeditor.com/4.4.5.1/standard/ckeditor.js"></script>
    <script type="text/javascript" src="Scripts/ng-ckeditor.min.js"></script>
    <script type="text/javascript" src="Scripts/Summaries.js"></script>
    <link rel="stylesheet" href="Styles/ng-ckeditor.css">
    <link rel="stylesheet" href="Styles/Summaries.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

            <div class="ui-widget-content" id="try" style="width: 100px; height: 100px; background-color: #f00;"></div>

javascript: javascript:

$(document).ready(
    function () {
        $("#try").resizable({
            maxHeight: 1200
        });
    }
    )

jQuery UI depends on jQuery. jQuery UI取决于jQuery。 Judging off your code, you're only including jQuery UI. 从您的代码来看,您仅包含jQuery UI。

Add

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

to your scripts. 您的脚本。

Check your console as it stands, you should see jQuery is not defined . 检查控制台的状态,您应该看到jQuery is not defined

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM