javascript - Timing fancybox popup -
i have popup window using fancybox add timings to, show after 1 second maybe , disappear after 5. cant figure out add delays in code using, please can help?
<script type="text/javascript"> jquery(document).ready(function ($popup) { $popup("#hidden_link").fancybox({ oncomplete: function () { $popup("#fancybox-img").wrap($popup("<a />", { href: "mylink.html", target: "_blank", // delay: 9000 delay ideally })); } }).trigger("click"); }); </script>
<a id="hidden_link" href="images/myimage.jpg" style="visibility:hidden;"></a>
you can use $.fancybox.open()
, see details here - can explain $.fancybox.open( [group], [options] ) params , if can add youtube link href?, , $.fancybox.close()
.
settimeout(function(){ $.fancybox.open(...) }, 1000); settimeout(function(){ $.fancybox.close(...) }, 5000);
Comments
Post a Comment