Disable Gallery

175 views
Skip to first unread message

Mohamed

unread,
Jun 14, 2010, 10:57:39 AM6/14/10
to fancybox
Hi,

I'm using fancybox for the first time..


In my page, i have plenty of links, and i use the rel attribute for
fancybox (<a href="link.html" rel="fancybox" ...)

And this is my code for setting up fancybox

$(document).ready(function() {
$("a[rel=fancybox]").fancybox({
'width' : '50%',
'height' : '70%',
'autoScale' : false,
'type' : 'iframe',
'cyclic' : false,
'overlayShow' :false
});
});

The problem is, when i click on the first link it works, but when a
click on the close icon, instead of closing the box, it shows the
content of the second link!! it's a kind of gallery so every time i
close the box it shows automatically the content of the next link in
the page. All i want is, when i click on the close button... it closes
the box.
PS: i don't wanna use the class or id attributes with fancybox.

Thx!

JFK

unread,
Jun 14, 2010, 3:31:16 PM6/14/10
to fancybox
show a link with issue

DaNieL85

unread,
Jul 14, 2010, 11:24:27 AM7/14/10
to fancybox
Same problem here, wull be great an 'disable gallery' option.
My code:

$("a.add-to-cart").fancybox({
[options]
});

and the html:

<a href="/to-ajax/product/5" class="add-to-cart">Add "Product 5" to
cart</a>
<a href="/to-ajax/product/6" class="add-to-cart">Add "Product 6" to
cart</a>
[and so on...]

DaNieL85

unread,
Jul 14, 2010, 11:39:51 AM7/14/10
to fancybox
Just 'solved': my links had the same "rel" atribute (for a coding
mistake).

Changing the rel attribute, fancybox nomore create a galery.

On Jul 14, 5:24 pm, DaNieL85 <daniele.pigned...@gmail.com> wrote:
> Same problem here, wull be great an 'disablegallery' option.
Reply all
Reply to author
Forward
0 new messages