From aaafdbadf7cf1a2ad86c8116cc0e47ba56ee51ae Mon Sep 17 00:00:00 2001
From: Cory LaViska
+ Dropdowns require shoelace.js to make them interactive. You don’t need to
+ initialize them — simply include the script and everything “just works.”
+
+ There is no JavaScript API. Shoelace’s philosophy believes that custom components should act + like native components as much as possible. You can, however, listen for various events: +
+show – Fires when a dropdown is shown.
+ hide – Fires when a dropdown is hidden.
+ select – Fires when a dropdown menu item is selected. The second callback
+ argument is a reference to the respective menu item.
+
+ This example will log all three events for a dropdown with an id of my-dropdown.
+
+$('#my-dropdown')
+ .on('show', function(event) {
+ console.log('show', event.target);
+ })
+ .on('hide', function(event) {
+ console.log('hide', event.target);
+ })
+ .on('select', function(event, item) {
+ console.log('select', event.target, item);
+ });
+
+
@@ -1307,6 +1344,38 @@ PRINT "SHOELACE IS AWESOME"
+ Tabs require shoelace.js to make them interactive. You don’t need to initialize
+ them — simply include the script and everything “just works.”
+
+ There is no JavaScript API. Shoelace’s philosophy believes that custom components should act + like native components as much as possible. You can, however, listen for various events: +
+show – Fires when a tab is shown. The second callback argument is the
+ respective tab pane.
+ hide – Fires when a tab is hidden. The second callback argument is the
+ respective tab pane.
+
+ This example will log both events for tabs with an id of my-tabs.
+
+$('#my-tabs')
+ .on('show', function(event, tabPane) {
+ console.log('show', event.target, tabPane);
+ })
+ .on('hide', function(event, tabPane) {
+ console.log('hide', event.target, tabPane);
+ });
+
+