Sha256: 2645f83ee94d953f3251f66efb72d5a1f90758dc94a25039e3361d2d5f3257d4
Contents?: true
Size: 728 Bytes
Versions: 137
Compression:
Stored size: 728 Bytes
Contents
Spotlight.onLoad(function() { $('[data-input-select-target]').selectRelatedInput(); }); /* Simple plugin to select form elements when other elements are clicked. */ (function($) { $.fn.selectRelatedInput = function() { var clickElements = this; $(clickElements).each(function() { var target = $($(this).data('input-select-target')); var event; if ($(this).is("select")) { event = 'change'; } else { event = 'click'; } $(this).on(event, function() { if (target.is(":checkbox") || target.is(":radio")) { target.prop('checked', true); } else { target.focus(); } }); }); return this; }; })(jQuery);
Version data entries
137 entries across 137 versions & 1 rubygems