Sha256: 29d7036a5e011b6a91d50b7a291d9c5979eb5bb11b3a9e9e4f0b2ed2a5e29a7b
Contents?: true
Size: 672 Bytes
Versions: 54
Compression:
Stored size: 672 Bytes
Contents
/** * Not empty state helper-wrapper. * * @author Htmlstream * @version 1.0 * */ ;(function ($) { 'use strict'; $.HSCore.helpers.HSNotEmptyState = { /** * Not empty state. * * @return undefined */ init: function () { var collection = $('input:not([type="checkbox"], [type="radio"]), textarea'); if (!collection.length) return; collection.on('keyup', function () { var $this = $(this), thisVal = $this.val(); if (thisVal != 0) { $this.addClass('g-state-not-empty'); } else { $this.removeClass('g-state-not-empty'); } }); } }; })(jQuery);
Version data entries
54 entries across 54 versions & 1 rubygems