我的页面中有一个 Jquery UI 选项卡。
我喜欢在更改选项卡时显示类似于 ajax 加载程序的加载程序。我提到了这个问题。但到目前为止,我对如何制作这个没有任何明确的想法。
我已经在我的脚本中这样尝试过。
<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 方法。)
喜欢这张图片