javascript - How can I clear form except some input text? -


i try :

$('.modal').on('show.bs.modal', function (e) {     ...     modal.find('.modal-content form#form-one').not('#datepicker, #timepicker').clearform(); }); 

i had use not on input text has id datepicker , id timepicker

but, if script executed, both input text cleared

how can solve problem?

you may apply particular css class let's dontclear on input fields wish keep.

you can exclude inputs dontclear class follows :

modal.find('.modal-content form#form-one').not('input[class=dontclear]').clearform(); 

hope helps !


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -