Y-SLD/assets/playkit/plugins/leaflet/sidebar/js/jquery-sidebar.min.js

1 line
761 B
JavaScript
Raw Normal View History

2024-03-01 11:23:55 +00:00
$.fn.sidebar=function(){var e=this,s=e.children(".sidebar-tabs").first(),i=e.children(".sidebar-content").first();return e.find(".sidebar-tabs > li > a").on("click",function(){var s=$(this).closest("li");s.hasClass("active")?e.close():e.open(this.hash.slice(1),s)}),e.open=function(a,l){"undefined"==typeof l&&(l=s.find('li > a[href="#'+a+'"]').parent()),i.children(".sidebar-pane.active").removeClass("active"),i.children("#"+a).addClass("active"),s.children("li.active").removeClass("active"),l.addClass("active"),e.trigger("content",{id:a}),e.hasClass("collapsed")&&(e.trigger("opening"),e.removeClass("collapsed"))},e.close=function(){s.children("li.active").removeClass("active"),e.hasClass("collapsed")||(e.trigger("closing"),e.addClass("collapsed"))},e};