fancybox

Resize fancybox with dynamic content

坚强是说给别人听的谎言 提交于 2019-12-11 02:28:58
问题 I'm using fancybox and when the box load I need to insert some items into a unordered list (ul) inside the box. The problem is that when I insert the items the content is larger than the box itself so I need to resize the box when the content has been updated. I can't get it to work with $.fancybox.resize(). How can I resize the box when the new content has been added? jQuery: $("a#OpenPopup").fancybox({ 'onStart': function () { loadContent(); } }); function loadContent(type) { var items = "

Show content with fancybox like a Javascript Alert

拈花ヽ惹草 提交于 2019-12-11 02:09:17
问题 I try to show the content from a PHP-file in a fancybox but I can't handle it. Now it's the following situation: If a file permission problem occures a <div id="error"> is shown on the website. I'd like to have the content from <div id="error"> in fancybox. Everything I try I get the notice "The requested content cannot be loaded. Please try again later." That means the fancybox, it the file permission error occures, should be shown when the page is loading and not like usual shown when some

How to launch fancybox from button onclick event to draw google chart?

巧了我就是萌 提交于 2019-12-11 01:49:12
问题 Can we draw a google chart in a pop up fancybox? I have data shown in a table, and there is a button in each row for showing google chart of each record. Currently, my chart is always shown in the bottom after the table, but when the record is scroll over the screen, user need scroll to bottom to get the chart view. Is it possible to use fancybox or some way solving this inconvenient? Thanks for any advise! html: <table> <tr> <td> data </td> ... <td> <button onclick="showChartByEmpId()"> pie

Problem with jQuery in IE8 with Fancybox

隐身守侯 提交于 2019-12-11 01:40:33
问题 I recently aquired an old website (we're talking tables, image maps, you name it). I was asked to make an old link to a Flash gallery into a lightbox. I simply used a javascript: openLightbox() on the gallery link (top right corner). I know, I know, but it doesn't seem out of place on this site. Anyway, I also include a JavaScript file scripts.js, which Includes jQuery and CSS files for fancybox. Use AJAX to get some JSON of image filenames Create a hidden unordered list on the page with

Fancybox v2 override/format title

隐身守侯 提交于 2019-12-11 01:35:14
问题 How can i override the Title in the new version of fancy box? $(document).ready(function() { $(".photogalleryLightbox li a").fancybox({ helpers:{ title: { type: 'inside', beforeShow: function(opts) { console.log('beforeShow title helper'); }, }, buttons : {} }, beforeShow: function() { console.log('beforeShow'); // var obj = $(currentArray[currentIndex]); // from prev. version // if (obj.next().length) return obj.next().html(); // from prev. version } }); }); I tried this but don't know how

Attach fancybox to a link inside the fancybox

旧街凉风 提交于 2019-12-11 01:13:41
问题 I would like to know a way to load my fancybox and to attach a fancybox to one of the link in this fancybox. I'm using since today the last version of fancybox (2.0.1). Here is what I tried without success: $('a.new_category_link').fancybox({ closeClick: false, afterShow: function() { $('a.edit_category_link').fancybox({ closeClick: false }); } }); As required with version 2.0.1, my link with class "edit_category_link" has also the class "fancybox.ajax". For the people used to the oldest

Navigation arrows not working in fancybox

流过昼夜 提交于 2019-12-11 01:03:21
问题 I'm trying to make fancybox2 work on my website and am having problems with navigation arrows. Clicking on prev/next arrow when looking at an image which is part of a gallery (same rel) just lead to an empty squared fancybox with "next" (or "previous") as a title. I'm not able to go back to the image I was looking and must close the fancybox. What is weird is that Fancybox seems to work correctly though, all scripts and css are correctly loaded, I'm able to open an image in a fancybox and

Fancybox2 with images and video in the same group using JWPlayer 6

筅森魡賤 提交于 2019-12-11 00:46:10
问题 I'm trying to create a gallery group that mixes images and video, with the video using JWPlayer6. I have each working as separate groups, but I can't workout how to integrate the two. <!-- FancyBox to display images --> <script type="text/javascript"> $(document).ready(function() { $(".fancybox").fancybox({ helpers : { title : { type : 'inside' } }, // helpers beforeLoad: function(){ } }); }); <!-- FancyBox to display videos --> <script type="text/javascript"> $(document).ready(function() { $

jQuery FancyBox : fixed position of popup with respect to window while scrolling

左心房为你撑大大i 提交于 2019-12-11 00:09:42
问题 How can I fix the position of fancybox popup window on the screen when scrolling the page? Is there any options in this plugin or I have to define it using css ? 回答1: From the API page, centerOnScroll seems to be what you want: Key: centerOnScroll Default Value: false Description: When true, FancyBox is centered while scrolling page 回答2: The problem with simply using the centerOnScroll API option is that while you scroll up and down the page, you will notice that your fancybox window has to

Fancybox 2.1.3 preventing iframe from haivng scrollbars

主宰稳场 提交于 2019-12-11 00:04:09
问题 I am using fancybox.js version 2.1.3 to place external content into an iframe. I am doing this by placing the url followed by a div id (e.g. http://somesite.com#about), this seems to work however the problem is I have not found away to stop fancybox from scrolling. preventing scrolling is necessary since i will be placing several div ids on the same external page and then placing them in iframes with fancybox, and i do not want to give the viewer the ability to scroll down within the iframe