Sha256: 68ab2e15e04a7643aa2fa5cf5644df1d8d500daaafca43be9f51f1d61ebbd614
Contents?: true
Size: 679 Bytes
Versions: 43
Compression:
Stored size: 679 Bytes
Contents
//On page load // TODO - remove nonconflict stuff once prototype is gone for good var $j = jQuery.noConflict(); replace_ids = function(s){ var new_id = new Date().getTime(); return s.replace(/NEW_RECORD/g, new_id); } $j(function() { $j('a[id*=nested]').click(function() { var template = $j(this).attr('href').replace(/.*#/, ''); html = replace_ids(eval(template)); $j('#ul-' + $j(this).attr('id')).append(html); update_remove_links(); }); update_remove_links(); }) var update_remove_links = function() { $j('.remove').click(function() { $j(this).prevAll(':first').val(1); $j(this).parent().hide(); return false; }); };
Version data entries
43 entries across 31 versions & 8 rubygems