【发布时间】:2013-04-01 05:35:43
【问题描述】:
我的页面中有一个 Jquery UI 选项卡。
我喜欢在更改选项卡时显示类似于 ajax 加载器的加载器。我推荐了this question。但到目前为止,我对如何制作这个没有任何明确的想法。
我已经在我的脚本中这样尝试过。
<script>
$(function() {
$("#tabs").tabs({
ajaxOptions: {
error: function(xhr, status, index, anchor) {
$(anchor.hash).html("I tried to load this, but couldn't. Try one of the other links?");
var spinner = $( ".selector" ).tabs( "option", "spinner" );
$( ".selector" ).tabs( "option", "spinner", 'Retrieving data...' );
},
spinner: '<img src="http://i.stack.imgur.com/Pi5r5.gif" />'
}
});
});
</script>
如何以简单的方式做到这一点。 (这里我不喜欢使用ajax方法。)
喜欢这张图片
【问题讨论】:
标签: jquery ajax jquery-ui tabs