fancybox

Fancybox directive in ng-repeat is not grouping images

江枫思渺然 提交于 2019-12-23 06:08:06
问题 I am trying to use Fancybox within my app and while the plugin works (it opens the images in the lightbox), it is not recognizing the rel or data-fancybox-group attribute to group multiple images (so that I can navigate through them right in the lightbox). Here is my directive: app.directive('fancybox', function() { return { restrict: 'A', link: function(scope, element) { $(element).fancybox({ theme : 'dark' }); } }; }); And here is how I invoke it on the template: <figure ng-repeat="img in

Fancybox add stylesheet to parent page

时间秒杀一切 提交于 2019-12-23 05:58:34
问题 I have this code to add a stylesheet to a page in a fancybox iframe. Can I do the same to the parent page? I have tried this but it didn't work... window.parent.changeStyles(stylesheet) ; function changeStyles(styles) { $("", { rel: "stylesheet", type: "text/css", href: styles }).appendTo("head"); }; $('.change-styles').on('click',function(){ var stylesheet = $(this).attr('href'); changeStyles(stylesheet); return false }); 回答1: First, define a parent file: <html> <head></head> <body> <iframe

Fancybox - form submit and close it?

一笑奈何 提交于 2019-12-23 03:56:11
问题 I start my fancybox like code down $('a.detail').click(function() { $.fancybox({ 'width' : 750, 'height' : 520, 'title' : 'EDIÇÃO DE SHOW', 'titlePosition' : 'inside', 'transitionIn' : 'fade', 'transitionOut' : 'none', 'href' : 'templates/detail.php?id=<?php echo $tg_id['id'];?>', 'type' : 'iframe' }) }) and into myfancy, I got a form to update informations about schedules. $(function() { $("form#comment").submit(function() { var dat = $("#datepicker").val(); var uf = $("#uf").val(); var flr

Can you make fancyBox ignore title text when sizing media within an overlay?

冷暖自知 提交于 2019-12-23 03:39:06
问题 I'm using fancyBox 2.1.5 and displaying media with multi-line titles below them. My problem is that fancyBox seems to be shrinking media in an attempt to fit long titles on-screen. Below I've attached screenshots from my iPhone, where it is most obvious. Here the image is displayed at full size because I've removed the title: Here the image is shrunken, trying to account for the long title: I'd like fancyBox to ignore the title text when sizing media and always show it at full size, as seen

Fancybox Error automatic reload

╄→гoц情女王★ 提交于 2019-12-23 02:52:46
问题 i am a dummie with fancy box and i need help iwth this i load a form with fancybox automatically when the principal page is load but the content is reload every time i click in a select or input Thanks for your help. <script type="text/javascript"> $(document).ready(function() { $("#yt").fancybox( { closeBtn : false, closeClick : false, fancybox openEffect : 'none', closeEffect : 'none', helpers : { overlay : {closeClick: false} } } ).trigger('click'); }); </script> <form name="form1" action=

fancybox form submit

旧巷老猫 提交于 2019-12-23 01:59:36
问题 I have a form that submits some content to a database and it works fine. Now I want to move it to a fancybox. The problem is that when I click the submit button on the fancybox the page redirects to the actual form page instead of staying on the fancybox. Any idea on how to stop the page from redirecting? Thanks 回答1: How are you loading the content into the fancybox? If you use the iframe method, it should remain within it. See point 4 on this page to load data as an iframe http://fancybox

Appending Link To Head Of Iframe

為{幸葍}努か 提交于 2019-12-23 01:34:11
问题 I want to append element To head of an Iframe (fancybox) there is a strange problem : when I use Firefox to Breakpoint on line of code that append element to Head it works correctly but when I run site normally without firebug it does not work; I am using fancybox 1.3.4 and the code run in onComplete event var cssLink = document.createElement("link") cssLink.href = "/themes/furniture/css/test.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; var f123= document.getElementById(

JQuery Fancybox - Multiple inline instances

亡梦爱人 提交于 2019-12-22 13:30:39
问题 I am trying to call multiple inline items, and when I click them it only shows the first one's content! I am pulling my hair out please help. My Javascript Calling: <script type="text/javascript"> $(document).ready(function() { $('.fancybox').fancybox(); }); </script> My HTML: <div class="atrack"> <img src="images/albumcovers/Italian-Japanese-lg.jpg" class="trackcover" width="66" height="66" /> <p class="artist">Italian Japanese</p> <p class="trackname">Two Islands</p> <img src="images/buynow

Fancybox Slideshow works only once

六月ゝ 毕业季﹏ 提交于 2019-12-22 11:15:35
问题 My Fancybox slideshow only works once and stops. From what I can tell is that it's not looping back because something broke which I can't figure out what. If you go to their page to "Extended functionality" and try it out you'll see that it's not working there either.. or at least for me. <!-- Add Fancybox library --> <script type="text/javascript" src="http://www.Website.com/+Fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script> <script type="text/javascript" src="/+Fancybox/jquery

Find element on site from a fancybox iframe

徘徊边缘 提交于 2019-12-22 10:32:01
问题 I'm trying to update a element on my site from a fancybox. In the fancybox i do a $.post() and get back html data that i want to populate in a div on my page. I open up a iframe window with html and this script below is in that iframe . It cant find it from the fancybox so anybody got idea or solution on how to reach a element thats not inside the fancybox iframe ? $('.add-to-cart').click(function () { var $this = $(this).closest('form'); $.post($this.attr('action'), { quantity: $this.find('