RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: bitsinmotion
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.
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.