RailsCasts Pro episodes are now free!

Learn more or hide this

Mark Ciccarello's Profile

GitHub User: bitsinmotion

Comments by Mark Ciccarello

Avatar

I get a ReferenceError: event is not defined loading the page as soon as I add the code to implement "remove" in javascript. From Firebug:

(function() {

jQuery(function() {
$('form').on('click', '.remove_fields', function(event) {});
$(this).prev('input[type=hidden]').val('1');
$(this).closest('fieldset').hide();
return event.preventDefault();
});

}).call(this);

Anyone have any idea what's going on? Any help appreciated.