询问jquery-ui和jquery-min(2)

时间:2015-12-30 13:52:09

标签: jquery

感谢您之前的回复,我在下面粘贴的代码包括您的上一次更改,它仍然无法正常工作,我只能看到jquery-min,我可以从jquery-ui看到任何内容。< / p>

我在一个简单的HTML中使用来自谷歌主机的Jquery-min CDN文件,由Apache 2.4托管,以及脚本javascript jquery文件。 jquery-min脚本文件工作正常,但我无法理解为什么jquery-ui脚本不能很好地运行,例如jquery-ui日历功能,但带有图标的jquery-ui按钮不起作用。我该如何解决这个问题?我正在使用的脚本是否有问题,或者我不是很好地编写代码?我正在使用的代码如下:

<!DOCTYPE html>
    <html>

    <head>
        <title>Jquery Test</title>

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" />

        <script>
            $(document).ready(function() {
                $("#driver").click(function(event) {
                    $('#stage').load('result.html');
                });
            });



            $('#button').button({
                label: 'Test',
                icons: {
                    primary: 'ui-icon-circle-plus',
                    secondary: null
                }
            });



            $("button[type=submit]").button({
                icons: {
                    primary: "ui-icon-circle-plus"
                }
            }).click(function(event) {
                event.preventDefault();
            });
        </script>
    </head>
    <body>
        <button id="button">Button Tag </button>
        <input type="submit" value="Input Tag(submit)" />
        <div id="stage" style="background-color:cc0;">
            STAGE
        </div>

        <input type="button" id="driver" value="load Data" />

        <button type="submit">
            Add Driver
        </button>
    </body>
    </html>

0 个答案:

没有答案