Sha256: 8da3a7dcdef6a0874520ea968d13be56bcf458abffe352cf3156c6073fa3b5a1
Contents?: true
Size: 620 Bytes
Versions: 22
Compression:
Stored size: 620 Bytes
Contents
// On page load var replace_ids = function (s) { var new_id = new Date().getTime(); return s.replace(/NEW_RECORD/g, new_id); }; $(function () { 'use strict'; $('a[id*=nested]').on('click', function () { var template = $(this).attr('href').replace(/.*#/, ''); var html = replace_ids(eval(template)); $('#ul-' + $(this).attr('id')).append(html); update_remove_links(); }); update_remove_links(); }); var update_remove_links = function () { 'use strict'; $('.remove').on('click', function () { $(this).prevAll(':first').val(1); $(this).parent().hide(); return false; }); };
Version data entries
22 entries across 22 versions & 1 rubygems