diff --git a/docs/assets/example/index.js b/docs/assets/example/index.js index 64b4a32cd..97534413c 100644 --- a/docs/assets/example/index.js +++ b/docs/assets/example/index.js @@ -39,8 +39,8 @@ var art = new Artplayer({ selector: [ { html: 'Display', - switch: true, tooltip: 'Show', + switch: true, onSwitch: function (item) { item.tooltip = item.switch ? 'Hide' : 'Show'; art.subtitle.show = !item.switch; @@ -71,8 +71,10 @@ var art = new Artplayer({ { html: 'Custom Switch', icon: '', + tooltip: 'OFF', switch: false, onSwitch: function (item) { + item.tooltip = item.switch ? 'OFF' : 'ON'; console.info('You clicked on the custom switch', item.switch); return !item.switch; },