admin管理员组文章数量:1395424
I am trying to use the blockUI jQuery Plugin. I am including the libraries as such;
<script src=".blockUI.1.33.js"></script>
<script src="//ajax.googleapis/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
However Chrome is showing a TypeError
Uncaught TypeError: Object [object Object] has no method 'blockUI'
I have tried $.blockUI
and $.fn.blockUI
without success!
Thanks
Edit: I am calling the blockUI code from a function, which is triggered from a button click;
$(function () {
$('#btnAddIssue').click(function(){
$.blockUI();
)};
)};
I am trying to use the blockUI jQuery Plugin. I am including the libraries as such;
<script src="http://malsup./jquery/block/jquery.blockUI.1.33.js"></script>
<script src="//ajax.googleapis./ajax/libs/jquery/1.10.2/jquery.min.js"></script>
However Chrome is showing a TypeError
Uncaught TypeError: Object [object Object] has no method 'blockUI'
I have tried $.blockUI
and $.fn.blockUI
without success!
Thanks
Edit: I am calling the blockUI code from a function, which is triggered from a button click;
$(function () {
$('#btnAddIssue').click(function(){
$.blockUI();
)};
)};
Share
Improve this question
edited Feb 10, 2014 at 13:59
Jake Evans
asked Feb 10, 2014 at 13:44
Jake EvansJake Evans
1,0486 gold badges14 silver badges34 bronze badges
2 Answers
Reset to default 5change the order of scripts, because jquery.blockUI.1.33.js
which depends on the jquery.min.js
<script src="//ajax.googleapis./ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://malsup./jquery/block/jquery.blockUI.1.33.js"></script>
You have syntax errors in your script,
$(function () {
$('#btnAddIssue').click(function(){
$.blockUI();
)}; //--------------> Improper closing change it })
)}; //----------------> Improper closing change it })
Fixed:
$(function () {
$('#btnAddIssue').click(function () {
$.blockUI();
});
});
JSFiddle
Found the issue, I had included the jQuery library twice.. oops :)
本文标签: javascriptBlockUIUncaught TypeError Object object Object has no method 39blockUI39Stack Overflow
版权声明:本文标题:javascript - BlockUI - Uncaught TypeError: Object [object Object] has no method 'blockUI' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744112938a2591373.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论