Sha256: 80213f305a8c1be498cbb28ab694efbb1189a63edf4a474aa5a144c761819db3
Contents?: true
Size: 711 Bytes
Versions: 48
Compression:
Stored size: 711 Bytes
Contents
/*global Blacklight */ (function($) { 'use strict'; Blacklight.doResizeFacetLabelsAndCounts = function() { // adjust width of facet columns to fit their contents function longer (a,b){ return b.textContent.length - a.textContent.length; } $('ul.facet-values, ul.pivot-facet').each(function(){ var longest = $(this).find('span.facet-count').sort(longer).first(); var clone = longest.clone() .css('visibility','hidden').css('width', 'auto'); $('body').append(clone); $(this).find('.facet-count').first().width(clone.width()); clone.remove(); }); }; Blacklight.onLoad(function() { Blacklight.doResizeFacetLabelsAndCounts(); }); })(jQuery);
Version data entries
48 entries across 48 versions & 1 rubygems