javascript - jQuery 1.10.2 and jQuery UI 1.10.3 - Stack Overflow

I downloaded jQuery UI 1.10.3.And it es with an older version of jQuery which is 1.9.1.And I have a l

I downloaded jQuery UI 1.10.3. And it es with an older version of jQuery which is 1.9.1. And I have a later version of jQuery: 1.10.2. But jQuery UI seems does not like to work with 1.10.2... Is there anyway to make it works? Or I should just live with it..

<script src="js/jquery-1.9.1.js"></script>
<!--
<script src="jquery-1.10.2.min.js">
-->
<script src="js/jquery-ui-1.10.3.custom.js"></script>
</script>
<script src = song_Selector.js>
</script>
<script>
    $(function() {

        $( "#progressbar" ).progressbar({
            value: 50
        });
    });

</script>


<body>

    <p id="demo">Click the button to do something.</p>
    <button onclick="draw_Progress_Bar ()">Try it</button>

    <h2 class="demoHeaders">Progress Bar</h2>
    <div id="progressbar"></div>

</body>

Codes are above, without the <html> tag.

I downloaded jQuery UI 1.10.3. And it es with an older version of jQuery which is 1.9.1. And I have a later version of jQuery: 1.10.2. But jQuery UI seems does not like to work with 1.10.2... Is there anyway to make it works? Or I should just live with it..

<script src="js/jquery-1.9.1.js"></script>
<!--
<script src="jquery-1.10.2.min.js">
-->
<script src="js/jquery-ui-1.10.3.custom.js"></script>
</script>
<script src = song_Selector.js>
</script>
<script>
    $(function() {

        $( "#progressbar" ).progressbar({
            value: 50
        });
    });

</script>


<body>

    <p id="demo">Click the button to do something.</p>
    <button onclick="draw_Progress_Bar ()">Try it</button>

    <h2 class="demoHeaders">Progress Bar</h2>
    <div id="progressbar"></div>

</body>

Codes are above, without the <html> tag.

Share edited May 18, 2014 at 14:12 Qantas 94 Heavy 16k31 gold badges72 silver badges88 bronze badges asked Jul 5, 2013 at 14:20 87492368749236 4747 silver badges13 bronze badges 6
  • 3 It should work...I noticed your other scripts are in your js directory, and your 1.10.2 script was not, is this correct? – tymeJV Commented Jul 5, 2013 at 14:24
  • @tymeJV yes it is correct that they are not in same folder... thats the problem? (Trying..) Didn't work.. – 8749236 Commented Jul 5, 2013 at 14:44
  • What about the console, do you see any errors? – tymeJV Commented Jul 5, 2013 at 14:46
  • Actually I haven't know there is a console window when I was trying to mix together >_<b.. sry.. (i know it now.. I just stepped into this hole yesterday..) – 8749236 Commented Jul 5, 2013 at 19:33
  • It's your best friend. On Chrome, just hit F12 and select "Console" from the tabs. – tymeJV Commented Jul 5, 2013 at 19:41
 |  Show 1 more ment

2 Answers 2

Reset to default 4

When you are loading the script, you've forgotten the end tags, and you've also forgotten your <head> tags if this is the whole document:

<!-- <script src="js/jquery-1.9.1.js"></script> -->
<script src="jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script src = song_Selector.js></script>
<script>
    $(function() {
        $( "#progressbar" ).progressbar({
            value: 50
        });
    });
</script>

<body>
    <p id="demo">Click the button to do something.</p>
    <button onclick="draw_Progress_Bar ()">Try it</button>

    <h2 class="demoHeaders">Progress Bar</h2>
    <div id="progressbar"></div>
</body>

What happened was actually the following when you unmented jQuery 1.10.2:

<script src="jquery-1.10.2.min.js">
    <script src="js/jquery-ui-1.10.3.custom.js"></script>
</script>

As any text inside a <script> tag is ignored with an src attribute set and will not be parsed, this will not be loaded.

Before, it would have worked fine as it would have simply been the following:

<script src="js/jquery-ui-1.10.3.custom.js">
    </script>
</script>

... with the text inside the tag being ignored, as there is a src attribute (with this having no effect).

you can this by function load script

    function loadscript(url){
var doc = document.getelementbytagname("head");
var script = document.createlement("script") ; 
script.url = script
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744879919a4598777.html

相关推荐

  • javascript - jQuery 1.10.2 and jQuery UI 1.10.3 - Stack Overflow

    I downloaded jQuery UI 1.10.3.And it es with an older version of jQuery which is 1.9.1.And I have a l

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信