How to use the shufflejs/src/shuffle.EventType function in shufflejs

To help you get started, we’ve selected a few shufflejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meine-stadt-transparent / meine-stadt-transparent / mainapp / assets / js / persons.js View on Github external
$el.attr('tabindex', lastTabindex);
            lastTabindex++;
        };

        // Try to find all selectable elements that appear _after_ this grid and set the tabindex explicitly
        $gridEl.parents().prevAll().find("a, input, button, [tabindex]").filter(":visible:not(:disabled)").each((i, el) => overrideTabindex($(el)));

        getSortedItems().forEach(($item) => {
            $item.find("a").attr("tabindex", lastTabindex);
            lastTabindex++;
        });

        // Try to find all selectable elements that appear _after_ this grid and set the tabindex explicitly
        $gridEl.parents().nextAll().find("a, input, button, [tabindex]").filter(":visible:not(:disabled)").each((i, el) => overrideTabindex($(el)));
    };
    grid.on(Shuffle.EventType.LAYOUT, () => {
        recalcTabindexes();
    });
    recalcTabindexes();

    if ($gridEl.parents(".tab-pane").length > 0) {
        // We're inside a tab content, so the list might disappear and reappear
        let tabId = $gridEl.parents(".tab-pane").attr("id"),
            $tab = $(".nav-link[href=\"#" + tabId + "\"]");
        $tab.on("shown.bs.tab hidden.bs.tab", () => {
            // TODO: We don't actually need to update and show the effect every time
            grid.update();
        });
    }

    let $groupRadios = $(".filter-organizations input[type=radio]"),
        $groupDropdownLinks = $(".filter-organizations a"),

shufflejs

Categorize, sort, and filter a responsive grid of items

MIT
Latest version published 3 months ago

Package Health Score

81 / 100
Full package analysis