Sha256: 1ea469f7d887e5300beca917ba31ccc36bfff75537e294741ba21197e2fcf757
Contents?: true
Size: 525 Bytes
Versions: 14
Compression:
Stored size: 525 Bytes
Contents
$(function() { $('input, select').on('change', function(event) { var $element = $(event.target), $container = $element.closest('.example'); if (!$element.data('tagsinput')) return; var val = $element.val(); if (val === null) val = "null"; $('code', $('pre.val', $container)).html( ($.isArray(val) ? JSON.stringify(val) : "\"" + val.replace('"', '\\"') + "\"") ); $('code', $('pre.items', $container)).html(JSON.stringify($element.tagsinput('items'))); }).trigger('change'); });
Version data entries
14 entries across 14 versions & 4 rubygems