Not sure what you are trying to do. Assuming you want to clear inputs so the user can have a blank form?
If so then try
$('input').val('');
If you want to remove the content of that div then just use
$("div#user-input").html('');
Hope this helps.
Basically when I launch the modal I have a jquery script that creates form elements in a div. What I want to do is when you click the exit button to close the modal I want to clear all the form inputs.
Then what you want is to clear the values of the inputs so you need to do something like
$('input,select').val(''); $('textarea').text('');
Hope this helps..
Please take a moment to rate and review the plugin and/or support. http://wordpress.org/support/view/plugin-reviews/easy-modal
Still having problems with this issue. I know how to reset my form fields and have done it with a link. I want to however accomplish this same action using the close button of the modal. I have tried using the selector $("a.close-modal")
along with the .click()
jquery event but nothing happens.
You will probably need to override the default functionality like so.
$("#eModal-1 .close-modal").click(function(e){
e.preventDefault();
// Your code here
$("eModal-1").emodal("close");
})