jquery - Open fancybox 2.1.4 using javascript -


i have div id #popupcontent. has text inside , loads modules via php, working fine if assign box tag. want open via javascript how do that.. documentation si confusing.

as said on fancybox 2.1.4, tried use

<div id="popupcontent">   <div class="row">     <div class="col...>       <h2> bla bla bla </h2>     </div   </div> </div 

i tried this

<script type="text/javascript">     (function() {         $.fancybox($('#popupcontent'));     })(); </script> 

create button , call function so-

<button id="popupopenbutton" onclick="myfunction()"> 

and

function myfunction(){  $.fancybox($('#popupopenbutton')); } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -