fancybox

FancyBox v2 - login box

浪子不回头ぞ 提交于 2019-12-28 04:28:09
问题 I've readed and went trough all examples on: - http://fancyapps.com/fancybox/ There is nothing to help me with making a pop-up login box. I've checked the old version Fancybox 1.3.x which have an example for login box, but that method doesn't really work on new Fancybox v2. If anyone can help me, I will be happy. So far I have this code, which is semi-working: $("#top-login-button").click(function() { $.fancybox.open({ href : "#login_form", padding : 0, onClosed : function() { $("#login_error

close fancy box from function from within open 'fancybox'

故事扮演 提交于 2019-12-28 04:06:41
问题 Hi all i want to be able to close fancyBox when it is open from within. I have tried the following but to no avail: function closeFancyBox(html){ var re = /.*Element insert complete!.*/gi; if( html.search( re ) == 0 ){ $.fancybox.close(); //alert("foo"); } } foo will open in dialog but will not close down. any hints? 回答1: Try this: parent.$.fancybox.close(); See Fancybox API documentation. 回答2: According to http://fancybox.net/faq How can I close FancyBox from other element? ? Just call $.fn

Open fancybox from function

旧城冷巷雨未停 提交于 2019-12-28 04:00:15
问题 I am trying to open a fancybox from a function I have - in short my HTML code looks like this; <a href="#modalMine" onclick="myfunction(this); return false;"> click </a> and a part of my function looks like this; function myfunction(me) { $(me).fancybox({ 'autoScale': true, 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'speedIn': 500, 'speedOut': 300, 'autoDimensions': true, 'centerOnScroll': true, }); } The above works in IE but not in FireFox or Chrome - any idea how I can fix this

Fancybox doesn't work with jQuery v1.9.0 [ f.browser is undefined / Cannot read property 'msie' ]

孤人 提交于 2019-12-27 08:18:45
问题 Fancybox breaks with the new jQuery v1.9.0. It affects both, Fancybox v1.3.4 and below - and - v2.1.3 and below. The errors shown are : v1.3.4 : Timestamp: 15/01/2013 10:03:28 AM Error: TypeError: b.browser is undefined Source File: ...fancybox/jquery.fancybox-1.3.4.pack.js Line: 18 ... other errors Uncaught TypeError: Cannot read property 'msie' of undefined jquery.fancybox-1.3.4.pack.js:18 Uncaught TypeError: Object [object Object] has no method 'fancybox' In v2.1.3 : Timestamp: 15/01/2013

Fancybox dynamic width/height issue - how to code in the defaults to fall back on?

房东的猫 提交于 2019-12-25 18:37:44
问题 I am just trying to implement this: http://jsfiddle.net/BJNYr/ $(".fancybox") .attr('rel', 'gallery') .fancybox({ type: 'iframe', autoSize : false, beforeLoad : function() { this.width = parseInt(this.href.match(/width=[0-9]+/i)[0].replace('width=','')); this.height = parseInt(this.href.match(/height=[0-9]+/i)[0].replace('height=','')); } }); But I am wondering what do I have to add to the fancybox declaration so that it has default width/height to fall back on, in case the user doesn't pass

Submiting a form in a fancybox

房东的猫 提交于 2019-12-25 14:41:55
问题 Is it possible to create a form to be submitted within a fancybox. <a class="assignScoreValues" href="/quality/assign-score-values/id/1">Assign Score Values</a> Then in the controller I display a form to be submitted. I can't redirect as I will lose the information on the original page. I'm thinking that it's not possible? 回答1: You can submit the form with AJAX using Jquery and serializeArray() . To use an HTML link for for submission: <a onclick="var data=jQuery('#form_id').serializeArray();

Fancybox inline popup on mobile not moving with page scroll

不羁岁月 提交于 2019-12-25 14:11:29
问题 I am working on this website: http://www.fairfaxandroberts.com.au/ And I am using fancybox for inline popup: http://fancyapps.com/fancybox/ When you visit the site you can see the popup that is shown down below the instagram feed when you scroll. On desktop and larger version it is working well, but on mobile versions the popup is shown when you scroll below insta feed, but it stays on the position where it is shown, it doesn't move with the page scroll behind. The jQuery code I use to

Passing variable from fancybox to parent page when closing fancybox

你。 提交于 2019-12-25 12:12:55
问题 Hi im trying to send a variable from a child iframe fancybox to the parent. But i cant seem to grasp how to do it. Does anyone have a idea. I already tried with js. A friend suggested to do it with php but havent find a solution. I have a mess right now. I tried another questions answers similar to mine with no luck. Here is the code this is in the fancybox: <script type="text/javascript"> function OnClickButton (nombre) { parent.$.nombre(nombre); parent.$.fancybox.close(); } </script> <?php

Passing variable from fancybox to parent page when closing fancybox

无人久伴 提交于 2019-12-25 12:11:17
问题 Hi im trying to send a variable from a child iframe fancybox to the parent. But i cant seem to grasp how to do it. Does anyone have a idea. I already tried with js. A friend suggested to do it with php but havent find a solution. I have a mess right now. I tried another questions answers similar to mine with no luck. Here is the code this is in the fancybox: <script type="text/javascript"> function OnClickButton (nombre) { parent.$.nombre(nombre); parent.$.fancybox.close(); } </script> <?php

Fanybox gallery stop autoplay on hover

徘徊边缘 提交于 2019-12-25 12:00:32
问题 Is there a solution to stop the autoPlay if the user first clicks the "next" button? Or to stop the autoPlay if user hovers the image? 回答1: You could use the $.fancybox.play() method to toggle the fancybox (auto) slideshow on mouse hover within the afterShow callback like : jQuery(document).ready(function ($) { $(".fancybox").fancybox({ autoPlay: true, // starts slideshow afterShow: function () { $(".fancybox-outer").on("mouseover", function () { $.fancybox.play(false); // stops slideshow });