fancybox-2

jQuery Fancybox and YouTube embeds

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 07:22:17
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', closeEffect : 'none' }); }) But each time I click the link, it just opens up the YouTube video full-screen in the

Fancybox - Video auto close function

妖精的绣舞 提交于 2019-11-28 14:46:05
i'm using a Fancybox Media. I want to when the video complete, close the fancybox.. Here is my code: $('.fancybox-media').attr('rel', 'media-gallery').fancybox({ openEffect : 'none', closeEffect : 'none', prevEffect : 'none', nextEffect : 'none', arrows : false, padding : '0', margin: '0', width: '100%', height: '100%', helpers : { media : { youtube : { params : { autoplay : 1, rel : 0, controls : 0, showinfo : 0, autohide : 1 } }}, buttons : {} } }); JFK Here it's the recipe : 1). Load the youtube's player API into your page. 2). Create 3 functions : onYouTubePlayerAPIReady - listens for

FancyBox and Youtube API events

岁酱吖の 提交于 2019-11-28 14:33:45
I'm trying to fire an event once the youtube video that I'm playing into my fancybox is ended. So I can close automatically the fancybox once the video is over. I have the last fancybox version and I'm on the youtube API, sticking to exemples but it seems that ytplayer object is "undefined" and I can't make it work properly. I have read a lot of stuffs on internet including this one, which seems to be good: How make fancybox auto close when youtube video id done? This is the code I'm using: JsFiddle $(".fancybox").fancybox({ 'openEffect' : 'none', 'closeEffect' : 'none', 'overlayOpacity' : 0.7

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

坚强是说给别人听的谎言 提交于 2019-11-28 13:41:49
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 . No need to mess with the original CSS file, use the tpl API option instead like $(".fancybox").fancybox({ tpl: { closeBtn: '<a title="Close" class="fancybox-item fancybox-close myClose" href="javascript:;"></a>' } }); Notice that I

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

旧时模样 提交于 2019-11-28 13:11:22
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() { $(".fancybox").fancybox(); }); </script> <script type="text/javascript"> $(document).ready(function

Fancybox beforeLoad Callback: Javascript, jQuery and referencing $this?

核能气质少年 提交于 2019-11-28 12:51:34
问题 I'm not sure how to accomplish what I'm looking to do, which, on starting out, seemed simple. I want to add a 'visited' class to a clicked link before calling the linked content into a fancybox iframe. Fancybox works fine, as long as I leave off the beforeLoad call. When added, the page simply reloads the window, bypassing the Fancybox. I'm not sure whether my beforeLoad function (here called add_visited ) is allowed to use jQuery (as in addClass ), or whether I need to stick to straight

Fancybox 2 title hover on gallery change

╄→гoц情女王★ 提交于 2019-11-28 12:13:03
问题 First post, so apologies in advance. I'm using this How to display fancybox title only on image hover and it works a treat, except when you click prev/next and the cursor is ALREADY hovering, the title doesn't appear - you have to hover out and back in again. Any idea how to make the title appear if you're already hovering when the image loads? Example here http://www.richardbarry.co.uk/fancyhover.php It worked in fancybox 1, like this- http://www.richardbarry.co.uk/gallery.php Any help much

pass value/variable from fancybox iframe to parent

与世无争的帅哥 提交于 2019-11-28 11:45:46
I'am trying to pass a variable/ value from the fancybox iframe to the parent window without success. Fancybox is launched from a link with class="fancybox fancybox.iframe" My code in the fancybox.iframe is: $(document).ready(function(){ $('.insert_single').click(function(){ var test = $('.members_body').find('{row.U_USERNAME}'); setTimeout(function(){ parent.$.fancybox.close();},300);return true; }); }); Where '{row.U_USERNAME}' is the username to find in the iframe. Then, in the parent there's the following code: $(document).ready(function(){ $('.fancybox').fancybox( { openEffect:'fade',

How show iframe with content below at FancyBox?

寵の児 提交于 2019-11-28 06:22:22
问题 Now I wrote a standart code for loading iframe in window FancyBox. So I specified type iframe and href link with youtube params. $.fancybox({ 'type' : 'iframe', 'maxWidth': "90%", 'href' : href.replace(new RegExp('watch\\?v=', 'i'), 'embed/') + '?theme=dark&color=white&autohide=1&rel=0&iv_load_policy=3&modestbranding=1&enablejsapi=1&showinfo=0&autoplay=1', 'padding' : 0, 'margin' : 0, 'autoCenter': false, 'scrolling' : 'no', 'fitToView' : false, 'width' : 950, 'overlayShow': true, beforeLoad

Fancybox multiple links to same gallery without duplication

∥☆過路亽.° 提交于 2019-11-28 03:41:56
问题 So I have a gallery of images, and a few links to it. Something like that <a href="/images/1.jpg" rel="1">title</a> <a href="/images/1.jpg" rel="1">link to first image</a> <a href="/images/2.jpg" rel="1">link to second image</a> <a href="/images/3.jpg" rel="1">link to third image</a> This is cause first image to duplicate in fancybox. Like this: http://filebeam.com/2dec41a1820f2525f040424578c4421c.jpg How can I make a multiple links to the same object without duplications? 回答1: If all links