lightbox

Slimbox V2 error when upgrading to jQuery 1.9.1

99封情书 提交于 2019-12-11 04:53:45
问题 When you have a site that uses Slimbox V2 and upgrade to jQuery 1.9.1 you get a strange behavior. The semitransparent overlay layer comes in front of your image instead of behind it. Before the upgrade, I used jQuery 1.8 and everything was working fine. Nothing else changed on the site. How to solve the issue without downgrading jQuery? 回答1: The reason it doesn't work is that jQuery 1.9 changes the way .after() works, and the complicated code in the original lightbox that I show below uses

prettyPhoto lightbox social tools: all images have the same number of Facebook likes

偶尔善良 提交于 2019-12-11 02:54:46
问题 Background: I have a site using a prettyPhoto lightbox to display photos. I've enabled social tools to display the 'tweet' and Facebook 'like' buttons on the lightbox, in hope to enable the ability to 'like' only the current photo being displayed to the one viewing it. Problem: The Facebook 'like' button actually results in all photos in the same gallery being liked: all photos display the same number of likes in the lightbox; and on Facebook, the user's 'like' in their news feed or recent

Dynamic Links and jQuery Lightbox issue : Loading image in lightbox…completely stumped!

梦想的初衷 提交于 2019-12-11 00:19:15
问题 I have a function that dynamically creates links for a photo gallery. The function also produces a larger image as a background image of a div when and thumbnail is clicked on. What I want to do is have a third event, where if the user clicks the enlarged image in the div, the jQuery Fancybox loads an even bigger version of the image being displayed in the div. The problem is that the link for the anchor tag I'm using is created dynamically, and I know that Fancybox parses the HTML when the

Lightbox using tags or <a href=[base64]>

烂漫一生 提交于 2019-12-10 16:36:44
问题 Is there any lightbox implementation that allows using <a href=base64-string" instead of an actual url? 回答1: Yes I think you can use Slimbox. It has it's own LinkMapper function. This allows you to return any url you want, based on element you are working on at that moment. This is javascript, so you could do an ajax request or whatever kind of link you want to return. So yes, you need jQuery for this one, but I think there is a Mootools version as well. Have a look at it. 回答2: You only

Fancybox force scroll to top

一世执手 提交于 2019-12-10 11:46:16
问题 I'm using the jQuery Fancybox plugin to display some content on a website. Unfortunately, when a link is clicked, the lightbox that is loaded starts at the same scroll position as the previous one. I tried using self.scrollTo(0,0) $.scrollTo(0) $('#top').scrollTo(); and a few others methods to push it back to the top, but none have seemed to work. Any help on this? 回答1: Does Fancybox have some sort of a callback? The reason I ask is, the lightbox is probably resetting the scroll back to the

I can't get Backbone.js events to trigger when the View is within a Fancybox

江枫思渺然 提交于 2019-12-10 10:48:45
问题 I have a Backbone View that renders within a Fancybox. I can click on an anchor tag and it will work but events in the Backbone view won't trigger. I've had the same problem with ShadowBox and another lightbox that I can't remember. Any thoughts? var LightboxItemView = Backbone.View.extend({ className : 'lighbox-item', events : { "click .lightbox-preview" : "visitItemPage" }, initialize : function() { _.bindAll(this, "render"); this.render(); }, visitItemPage : function() { console.log(

Is it possible to lightbox many images but only show one image to activate them?

ⅰ亾dé卋堺 提交于 2019-12-10 01:52:37
问题 I'm using Lightbox to display photos. So If I have two categories of photos, "work" and "vacation", I would do... <a href="images/image-1.jpg" rel="lightbox[work]">image #1</a> <a href="images/image-2.jpg" rel="lightbox[work]">image #2</a> <a href="images/image-3.jpg" rel="lightbox[work]">image #3</a> <a href="images/image-4.jpg" rel="lightbox[vacation]">image #4</a> <a href="images/image-5.jpg" rel="lightbox[vacation]">image #5</a> <a href="images/image-6.jpg" rel="lightbox[vacation]">image

how to display lightbox after Video Play Finishes?

こ雲淡風輕ζ 提交于 2019-12-09 13:03:19
问题 I have a youtube video. I want to show a lightbox when it stops playing. I need this to be done using javascript/jQuery or PHP. Ajax is also fine. I looked for a solution but didn't find one that worked. 回答1: If you can use youtube api then, something like this should work: <script type="text/javascript"> $(document).ready(function() { var player; function onYouTubePlayerAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'YmHAAqOsBqA', events: { 'onReady':

Creating an element that can remove it self?

这一生的挚爱 提交于 2019-12-08 15:57:39
问题 I'm building a lightbox as a school project, and I can't use jQuery. I've got an image. When you click it, Javascript makes a transparent div with the ID "overlay". I want the div to remove itself, or the parent to remove it but it doesn't work. I think it has to do with the fact that you cant link 'onclick' to an element that doesn't exists yet. 回答1: You have to remove the element from the parent. Something like this: d = document.getElementById('overlay'); d.parentNode.removeChild(d); Or

jquery lightbox on dynamic image

◇◆丶佛笑我妖孽 提交于 2019-12-08 09:36:33
问题 I would like to use lightbox (pirobox) for dynamically generated images. I use standard method - load css, js files and add selector on element, but it doesnt work. Have you any experiencies with it? I Also try $('.pirobox').bind('click', function() { $('.pirobox').piroBox({ my_speed: 400, bg_alpha: 0.3, slideShow : true, slideSpeed : 4, close_all : '.piro_close,.piro_overlay' }); }); 回答1: It is solved. Add this code after generating links. $(document).find('a.lightbox').lightBox(); 回答2: Use