mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
15 lines
488 B
Plaintext
15 lines
488 B
Plaintext
$(document).ready(function() {
|
|
$('a.close').click(function(event){
|
|
event.preventDefault();
|
|
$(this).parent().slideUp(250);
|
|
});
|
|
|
|
// Spree locates hidden with prev(), which with our current version of jQuery
|
|
// does not locate the hidden field, resulting in the delete failing. This
|
|
// handler updates the hidden field, fixing the problem.
|
|
$('body').on('click', 'a.remove_fields', function() {
|
|
$(this).next("input[type=hidden]").val("1");
|
|
return false;
|
|
});
|
|
});
|