sweet-modal icon indicating copy to clipboard operation
sweet-modal copied to clipboard

How to call a js function when modal is completely loaded?

Open hafiz-naser opened this issue 4 years ago • 0 comments

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'>&lt;</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'> &gt; </button></div>", width: 300, height:410, showCloseButton:false, })

hafiz-naser avatar Jan 22 '21 12:01 hafiz-naser