sweet-modal
sweet-modal copied to clipboard
How to call a js function when modal is completely loaded?
I created a div and an image in content section of sweet modal at run time. Now, I want to call a just function on it when modal is being displayed. But unable to do that. Anyone please help me how I can call js function when modal is loaded but not closed.
Here is my code.
$.sweetModal({ content: "<div class='mid_div'> <div class='outer_cls'><div class='img_container' id='sample_picture1' style='background-image: url("+image_src+")'></div><div class='modal_bck'></div></div></div><div id='controls1'><button id='rotate_left1' type='button' title='Rotate left'><</button><button id='zoom_out1' type='button' title='Zoom out'> - </button><button id='fit1' type='button' title='Fit image'> [ ] </button><button id='zoom_in1' type='button' title='Zoom in'> + </button><button id='rotate_right1' type='button' title='Rotate right'> > </button></div>", width: 300, height:410, showCloseButton:false, })