兩個月前我創建的腳本一次都沒有工作。 我已嘗試恢復備份文件,但沒有更改。出現在所有網站 此問題,從谷歌在使用腳本API的 功能,即我用的都是.button().corner()jquery-ui broken
鏈接和腳本:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script src="http://malsup.github.com/jquery.corner.js"></script>
錯誤:
BlockquoteUncaught exception: TypeError: Cannot convert '$("#BuyCredit")' to object
Error thrown at line 3, column 6 in() in http://www.t-samp.net/credit-shop.php : $("#BuyCredit").button().click(function() { called via Function.prototype.apply() from line 2, column 29359 in (b, f) in http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js : if(c[m].apply(b,f)===!1&&a.stopOnFalse) called from line 2, column 30902 in (b, c) in http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js : d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c)); called from line 2, column 19036 in (a) in http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js : A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready") called from line 2, column 28469 in() in http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js : c.removeEventListener("DOMContentLoaded",B,!1),e.ready()
我的腳本:
<script>
$(document).ready(function() {
$("#BuyCredit").button().click(function() {
$(".buycr").corner();
$(".buycr").css("display","block");
});
});
</script>
我的HTML:
<div class="buycr" data-corner="15px">
<div style="width:280px">Text</div>
</div>
<div style="width:100px">
<span id="HideBox">Zavřít</span>
</div>
感謝您的任何反饋
其中是ID爲「BuyCredit」的div?錯誤是$('#BuyCredit')沒有返回任何項 – 2012-04-12 17:30:08