問題:jQuery的滑塊不能在網頁上顯示,直到最後的.js文件下載顯示JQuery的滑塊,而頁面仍在加載
問:如何顯示jQuery的滑塊,而外部的.js仍然加載(有完成了Jquery下載,並下載其他第三方插件和模塊)。
場景:
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" />
<script type="text/javascript">
$(document).ready(function() {
// Product Price Slider
$(function() {
$("#fproductprice #slider-range").slider({
range: true,
logarithmic: true,
min: 1,
max: 100 ,
animated: true,
values: [1, 100],
slide: function(event, ui) {
$("#fppricefrom").val(ui.values[0]);
$("#fppriceto").val(ui.values[1]);
}
});
$("#fppricefrom").val($("#fproductprice #slider-range").slider("values",0));
$("#fppriceto").val($("#fproductprice #slider-range").slider("values",1));
});
});
</script>
</head>
<body>
<!-- Product Price -->
<div id="fproductprice">
Price:
<div id="slider-range"></div>
<br />
<input type="text" id="fppricefrom" size="8"/>
<input type="text" id="fppriceto" size="8"/>
</div>
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
</body>
</html>
嗨還沒有申請它,忙於其他重要問題。今晚將檢查它,並讓你知道,如果這有效。 – 2013-03-21 10:09:41