bootstrap3.0关于button方法的attempted to call method 'loading'问题
来源:互联网 发布:苏州大学网络缴费平台 编辑:程序博客网 时间:2024/04/29 14:06
在docs.min.js中有关于让按钮展示“正在加载”状态的方法:a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)})
在bootstrap3.0的文档中是这样使用的:
button type="button" id="loading-example-btn" data-loading-text="Loading..." class="btn btn-primary"> Loading state</button><script> $('#loading-example-btn').click(function () { var btn = $(this) btn.button('loading') $.ajax(...).always(function () { btn.button('reset') }); });</script>
但实际调用的时候却显示“attempted to call method 'loading'”,
解决方法:直接给按钮添加id为"loading-example-btn "后,无需调用btn.button('loading'),将a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)})修改为a("#loading-example-btn").click(function(){var b=a(this);b.button("loading")})即可
1 0
- bootstrap3.0关于button方法的attempted to call method 'loading'问题
- cannot call methods on button prior to initialization; attempted to call method 'loading'.
- cannot call methods on button prior to initialization; attempted to call method 'toggle' 解决
- 解决Error: cannot call methods on tabs prior to initialization; attempted to call method 'disable'的方法
- cannot call methods on masonry prior to initialization; attempted to call method 'appended' 瀑布流
- cannot call methods on dialog prior to initialization; attempted to call method 'close'
- cannot call methods on dialog prior to initialization; attempted to call method 'close'
- Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'clo
- Uncaught Error: cannot call methods on fileupload prior to initialization; attempted to call method
- cannot call methods on tooltip prior to initialization; attempted to call method 'hide'
- cannot call methods on tooltip prior to initialization; attempted to call method 'close'(…)
- 追踪bionic的call method的方法
- 关于Call的问题
- 关于AVAssetWriter,AVAssetWriterInput报错Cannot call method when status is 2的问题记录
- attempted to return null from a method with a primitive return type (int)异常的解决
- 关于导入包不全导致的The method createCall() from the type Service refers to the missing type Call错误
- 关于attempted to return null from a method with a primitive return type (int).报错解决方案
- 解决 bootstrap3.0 tab 不起作用的问题
- HDU 题目1106 排序
- Semaphore 和 Mutex
- CodeForces 448-B. Suffix Structures
- 在这人人躲在厕所斗地主的时代下页游平台如何绝地重生?
- Linux 在一个命令行上执行多个命令
- bootstrap3.0关于button方法的attempted to call method 'loading'问题
- Android之 ANR
- CodeForces 448-C. Painting Fence
- win32学习----编辑控件的使用
- Matlab中图片保存的5种方法
- 线程pthread_join和分离式线程
- android进程与线程详解一:进程
- hdu 4841 圆桌问题(用vector模拟约瑟夫环)
- 视频截图文字轻松提取。。瞬间高大上有木有。