Skip to content

Commit b40f3e3

Browse files
committed
Merge pull request #3 from obiPlabon/master
Close button fixed
2 parents a4ba9f3 + 3125d42 commit b40f3e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
$('#fields').on('click', '.remove', function (e) {
1818
e.preventDefault();
19-
if (confirm("Are you sure to delete?")) {
19+
if ($(".form-element").length > 1 && confirm("Are you sure to delete?")) {
2020
$(this).parents(".form-element").remove();
2121
$("#fields .form-element:last").find(".add-more").show();
2222
}

0 commit comments

Comments
 (0)