fancybox-2

FancyBox 2 Background Issue

微笑、不失礼 提交于 2019-11-28 02:17:48
I'm trying to use fancybox ( http://fancyapps.com/fancybox/ ) to show an image automatically on my page, but the background (greyed-out) portion is not working. Any ideas? See example at http://www.southshoreopera.org The issue is that if you open fancybox programmatically BEFORE the DOM is ready, somehow the overlay is not appended to the body element. This : <script type="text/javascript"> $(".fancybox").fancybox({ // API options }); $(".fancybox").eq(0).trigger('click'); </script> ... will trigger fancybox on page load WITHOUT an overlay (a manual click to the link thereafter won't

FancyBox - “Don't show this message again” button?

狂风中的少年 提交于 2019-11-28 02:13:32
问题 I have FancyBox on a website that pops up when they visit and has some info inside it. I'd like to add some kind of button that the user can click, and it sets a cookie not to show the message for about a month or so. I'm quite useless when it comes to things like this, so if anyone could walk me though what to do, that would be awesome. Here's what I have so far. At the bottom I've added what I think could be an anchor for the proposed cookie ("noShow"), but I'm not sure if it would work

Load next Images via Ajax and add to Fancybox

青春壹個敷衍的年華 提交于 2019-11-28 02:00:28
问题 My Problem is that I have a large gallery, that should not be load completely on first page load. So I load 10 of 50 images and add fancybox to them. When user clicks the next button, the 11th image should be loaded via Ajax and append to gallery container. Problem ist that fancybox stops at the 10th image, because it doesn't know the dynamic load ones. How can I add dynamic loaded images to fancybox2? currently I have this: function loadFancybox() { $('a.lightbox').fancybox({ helpers: {

jQuery Fancybox and YouTube embeds

萝らか妹 提交于 2019-11-28 00:56:19
问题 I'm trying to get a YouTube embed to open up in a Fancybox. I've based it on the code on the Fancybox page — http://fancyapps.com/fancybox Here is what I have: <a class="various fancybox" href="https://www.youtube.com/embed/jid2A7ldc_8?autoplay=1">Youtube (iframe)</a> And then in call.js $(document).ready(function() { $(".various").fancybox({ maxWidth : 800, maxHeight : 600, fitToView : false, width : '70%', height : '70%', autoSize : false, closeClick : false, openEffect : 'none',

jQuery Isotope filtering with Fancybox

家住魔仙堡 提交于 2019-11-27 22:47:59
问题 I made a Website with a Imagegallery, who is able of beeing filtered with jQuery Isotope. You can click on the thumbnails and then cycle trough the images with the fancybox plugin: Website Now the thing is, When the Imagegallery is beeing filtered, the fancybox plugin still cycles trough all the images. Even the ones who are not showing up when the filter is applied. I don't know how I could solve this. Fancybox determens a gallery with rel="gallery" . Isotope determines the filtering effect

Fancybox (jQuery) - Passing information from parent to iframe and iframe back to parent

不打扰是莪最后的温柔 提交于 2019-11-27 09:10:49
I am trying to open a fancybox iframe on my page. Pass over some basic information to the iframe. Then I want to make it so that the iframe talks back to it's parent. I am passing nameid-1 throughout statically, though I would really like to have this as variable such as: var nameid=$(this).attr('nameid') I just don't know how to execute this all correctly as I am new to Ajax/Javascript and struggling with the logic. Base.html JS: <script type='text/javascript'> //<![CDATA[ // Popup Function $(document).ready(function () { $('a.openinformation').fancybox({ openEffect: 'fade', openSpeed: 500 //

How to replace default controls with custom buttons in Fancybox 2.1.5?

跟風遠走 提交于 2019-11-27 07:56:27
问题 In Fancybox 2.1.5 I want to replace the default controls with my custom buttons (new preloader + close/next/prev buttons on sprite). I'm not sure how to adjust the css code properly. I tried to modify the CSS as follows, but there's something wrong, the 'next' icon shows up in the top right corner instead of the 'close' button. You can see my code on this gist. 回答1: No need to mess with the original CSS file, use the tpl API option instead like $(".fancybox").fancybox({ tpl: { closeBtn: '<a

Start local video in fancybox mit JWPlayer, video ID in url

青春壹個敷衍的年華 提交于 2019-11-27 07:31:19
问题 This is how I usually start a video file with fancybox and jwplayer. Head: <head> /* ... */ <script type="text/javascript" src="jwplayer/jwplayer.js"></script> <script type="text/javascript" src="fancybox/lib/jquery-1.8.2.min.js"></script> <script type="text/javascript" src="fancybox/source/jquery.fancybox.js?v=2.1.3"></script> <link rel="stylesheet" type="text/css" href="fancybox/source/jquery.fancybox.css?v=2.1.3" media="screen" /> <script type="text/javascript"> $(document).ready(function(

How do I make fancybox href dynamic?

一笑奈何 提交于 2019-11-27 04:55:05
I have the following fancybox code: $('.fancybox').fancybox({ 'autoScale' : false, 'href' : $('.fancybox').attr('id'), 'type':'iframe', 'padding' : 0, 'closeClick' : false, //some other callbacks etc the problem is I have twenty different A tag id's on the page and I want the fancybox href attribute to take the id of the clicked element, ie the one that triggered the event. I have tried several things, none of them have worked! 'href' : $(this).attr('id'), 'href' : $(this.element).attr('id'), This seems so simple but anytime I plug in 'this' or similar nothing works. Without each() or click()

FancyBox 2 Background Issue

蹲街弑〆低调 提交于 2019-11-26 23:42:12
问题 I'm trying to use fancybox (http://fancyapps.com/fancybox/) to show an image automatically on my page, but the background (greyed-out) portion is not working. Any ideas? See example at http://www.southshoreopera.org 回答1: The issue is that if you open fancybox programmatically BEFORE the DOM is ready, somehow the overlay is not appended to the body element. This : <script type="text/javascript"> $(".fancybox").fancybox({ // API options }); $(".fancybox").eq(0).trigger('click'); </script> ...