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.
-
3
It should work...I noticed your other scripts are in your
js
directory, and your1.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
2 Answers
Reset to default 4When 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
评论列表(0条)