Sha256: 744182fb1c44b7a597bace8ade0284e817ba69371c56895d9ae82d6e435319bd
Contents?: true
Size: 493 Bytes
Versions: 44
Compression:
Stored size: 493 Bytes
Contents
export default class AutoButtonsByMinItemsComponent { constructor(options = {}) { this.listSelector = options.listSelector; this.minItems = options.minItems; this.hideOnMinItemsOrLessSelector = options.hideOnMinItemsOrLessSelector; this.run(); } run() { const $list = $(this.listSelector); const $items = $list.find(this.hideOnMinItemsOrLessSelector); if ($list.length <= this.minItems) { $items.hide(); } else { $items.show(); } } }
Version data entries
44 entries across 44 versions & 1 rubygems