Created
December 4, 2013 18:10
-
-
Save felippemr/7792510 to your computer and use it in GitHub Desktop.
projects.js.coffee e project.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JQuery -> | |
$('form').on 'click' , '.remove_fields', (event) -> | |
$(this).prev('input[type=hidden]').val(1) | |
$(this).closest('fieldset').hide() | |
event.preventDefault() | |
Depois de gerado ele fica assim: | |
(function() { | |
JQuery(function() { | |
return $('form').on('click', '.remove_fields', function(event) { | |
$(this).prev('input[type=hidden]').val(1); | |
$(this).closest('fieldset').hide(); | |
return event.preventDefault(); | |
}); | |
}); | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment