Turbo87 / sidebar-v2

A responsive sidebar with tabs for Leaflet, OpenLayers, Google Maps, ...
https://turbo87.github.io/sidebar-v2/examples/
MIT License
850 stars 336 forks source link

Add docs #50

Open letmaik opened 9 years ago

letmaik commented 9 years ago

There should be some documentation.

One trivia I already found: The sidebar HTML has to come before the leaflet map div, otherwise it overlays the zoom buttons. Maybe that's also a bug?

Turbo87 commented 9 years ago

You are right, we certainly need better docs. Unfortunately I haven't found the time yet to write them. Feel free to help me if you want to.

woodbri commented 5 years ago

What is the correct way to programmatically open one of the sidebar tabs? I want to have an info tab that get populated via a click and ajax request and then open the that tab.

Turbo87 commented 5 years ago

@woodbri most/all of the implementations have an open() method with an ID parameter of the tab you want to open. e.g. https://github.com/Turbo87/sidebar-v2/blob/b906dd6885218a0b86fcecb4453e8a48dbe3cbf2/js/leaflet-sidebar.js#L131

woodbri commented 4 years ago

I need to some events to trigger when the sidebar opens and collapses? How can I get these? I can add an onclick event to the the icon that opens a specific panel, but the panel can be close either by 1) clicking the same icon, 2) clicking another icon, 3) clicking the close button.