Tuesday, December 5, 2017

How to Clear Form Content in modal, while close

$('#mymodalname').on('hidden.bs.modal', function () {
$(this)
    .find("input,textarea,select")
       .val('')
       .end()
    .find("input[type=checkbox], input[type=radio]")
       .prop("checked", "")
       .end();

})
</script>

No comments:

Post a Comment

Difference between hook_boot and hook_init Drupal

hook_boot() hook_init() hook_boot() will executes even on cached pages hook_init() will not executes on cached pages hook_boot() is ...