Sha256: 2451fd2911c7b30006d0b3e3601296b20b50325b81f7be895c3eaec98694bad4
Contents?: true
Size: 1.1 KB
Versions: 9
Compression:
Stored size: 1.1 KB
Contents
/* expand_contract_toggle.js: Support for show more/hide more in lists of umlaut content. Expand/collapse elements are already controlled via Bootstrap toggle, this just adds some additional behavior in hooks to change our labels and disclosure icons appropriately, and prevent following non-js href links. */ jQuery(document).ready(function($) { $(document).on("click", ".collapse-toggle", function(event) { event.preventDefault(); return false; }); $(document).on("show", ".collapse", function(event) { // Update the icon $(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-closed").addClass("umlaut_icons-list-open"); // Update the action label $(this).parent().find(".expand_contract_action_label").text("Hide "); }); $(document).on("hide", ".collapse", function(event) { // Update the icon $(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-open").addClass("umlaut_icons-list-closed"); // Update the action label $(this).parent().find(".expand_contract_action_label").text("Show "); }); });
Version data entries
9 entries across 9 versions & 1 rubygems