我想在href点击时显示加载程序。这是我的代码,它正常工作,除了Safari:
setTimeout(function(){
$.loader({className:'blue-with-image-2',content:''});
},200);
它与a href's onclick
事件相关联,只是一个明确的片段:
<a class="btn upload-btn" href="#" onclick=" setTimeout(function(){
$.loader({className:'blue-with-image-2',content:''});
},200);");
这里是blue-with-image-2 css部分(它的标准):
#jquery-loader.blue-with-image-2{border:0;padding-top:35px;background-color:transparent;text-align:center;background-image:url(/common/img/ajax-loader.gif);background-position:center center;background-repeat:no-repeat}