scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 304 forks source link

remove images after success upload in modal bootsrap #145

Closed sidaurukfreddy closed 8 years ago

sidaurukfreddy commented 8 years ago

Hello, really love you plugin lah ! firstly i have so much issue but while coding and debug solved one by one but most of all is about in modal bootsrap

Please repsond cause i need some one to digging in this issue, Thanks a lot scooth

Regards, Freddy Sidauruk

sidaurukfreddy commented 8 years ago

Thanks, solved by my self lah

if (data.status) //if success close modal and reload ajax table
{
 $('.cropit-image-preview').css('background-image', '');  //this remove background images
 $('.cropit-image-background').removeAttr('src');  //this remove images preview
$('#form').trigger("reset"); //reset form 
$('#myModal').find('form')[0].reset();
}