Hide loading spinner at title bar.
AlipayJSBridge.call('hideTitleLoading');
<h1>Please press the following buttons</h1>
<a href="javascript:void(0)" class="btn show">Show loading</a>
<a href="javascript:void(0)" class="btn hide">Hide loading</a>
<script>
function ready(callback) {
// Invoke directly if JSBridge is already injected
if (window.AlipayJSBridge) {
callback && callback();
} else {
// Otherwise listen to `AlipayJSBridgeReady` event
document.addEventListener('AlipayJSBridgeReady', callback, false);
}
}
ready(function(){
document.querySelector('.show').addEventListener('click', function(){
AlipayJSBridge.call('showTitleLoading');
});
document.querySelector('.hide').addEventListener('click', function(){
AlipayJSBridge.call('hideTitleLoading');
});
});
</script>