summaryrefslogtreecommitdiff
path: root/public/assets/js/classroom.js
blob: b1947f8a2cfa66a45c2da6e1a96e9d82ca1e5958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$(document).ready(function() {


    /** Categories Menu Toggler
     * -------------------------------------------------------------------------
     */
    $('.toggler').click(function(e) {
        e.preventDefault();

        // inner div (contains children of this category)
        var inner = $(this).parent().parent().find("ul.inner").first();

        // toggle 'show' class on/off
        if (inner.hasClass('show')) {
            inner.removeClass('show');
            inner.slideUp(350);
            $(this).html("+");
        } else {
            inner.addClass('show');
            inner.slideDown(350);
            $(this).html("–");
        }
    });



});