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