The callback event when subtitle is clicked.
document.addEventListener('subtitleClick', function(e) {
alert('subtitle clicked')
}, false);
<h1>Please click on the subtitle</h1>
<script>
document.addEventListener('subtitleClick', function(e) {
alert('subtitle clicked')
}, false);
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() {
AlipayJSBridge.call('setTitle', {
title: 'title',
subtitle: 'subtitle'
});
});
</script>