Skip to content
  • dossist's avatar
    updated sidebar toggle javascript · 72ddbe4b
    dossist authored
    Made improvements to the script.
    
    * `.active` class which used to be added when toggled were conflicting
    with bootstrap class, thus changed to `.on`.
    * Changed so that target element(s) should be specified via
    `data-target` attribute (like how bootstrap collapse script does). This
    allows multiple toggle parts on one page.
    * `togglejs()` method is added to jQuery, allowing it to be triggered
    like this:
    $(this).togglejs();
    * `togglejs()` can be used to trigger one-way animation:
    $(this).togglejs('show');
    this does show the element, and if it is already shown does nothing.
    72ddbe4b