Created
March 14, 2018 22:31
-
-
Save aaryan79831014/0969458840ec81770b571f73850b7245 to your computer and use it in GitHub Desktop.
Clear all inputs jquery modal form when the form closes
This file contains 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
$(document).ready(function () { | |
// clear all the inputs on the form on the modal id documentModal | |
$('#documentModal').on('hidden.bs.modal', function (e) { | |
$('input[type=radio]').prop('checked', false); | |
$('input[type=checkbox]').prop('checked', false); | |
$(this) | |
.find("input,textarea,select") | |
.val('') | |
.end() | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment