Thursday, 15 January 2015

javascript - Fancybox image in iframe - open in parent Window -


I have a problem using the fancybox plugin with an iframe: My current setup is:

Load news articles in a bootstrap model, which has an iframe from another domain (from the news system) - for example: I am at page.domain.com and load with content News.domain.com, where every news The article has been provided.

$ ('a.lightbox')

) (): (title: {type: 'inside'}, thumbs: {width: 90, height: }, (None), title: effect: "none", title: Show: 'true', title post: 'inside', assistants:: 60}}, first load: function () {this.title = $ (This.element) .find ('img'). Attr ('alt');}});

The faxbox opens up each item with a class lightbox, and everything looks fine. But in the iframe, it is opened inside the iframe. But I want to open in the original window outside the gallery.

So I usually use it:

  Parents. $ Fancybox ({ 

But now, I'm losing 'a.lightbox' selector. That's why I have to push items manually like this: < / P>

  beforeLoad: function () {// Here I need to read all the images in the same group, and modally it.group.push ({href: "... image1", Type: "Image", Title: "Picture 02", isDom: true})}}  "Image", "Title", "Image 01", IsDom: true}, {href: "... image2" Code> 

but I do not think this is a good option for me.

What is the standard $ ('a .lightbox ') , is there a better way to open a faxbox in the original window? ... selector?


No comments:

Post a Comment