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
Post a Comment