Re: Fancybox doesn't work within DOM

264 views
Skip to first unread message
Message has been deleted
Message has been deleted

JFK

unread,
Mar 18, 2010, 12:20:40 PM3/18/10
to fancybox
I just copy and pasted your script and it works perfectly in both FF
and IE
you may have something else in your page creating a conflict (don't
have time to debug now) ... but it's not fancybox

this script
jQuery("a.fancybox").fancybox({
'hideOnContentClick': true,
'titleShow' : false,
'onComplete': function() {
jQuery("#fancybox-outer").bind("contextmenu", function () {
jQuery.fancybox.close();
return false;
});
}
});

and this link:
<a class="fancybox" href="http://www.distriad.nl/thumb.php?
file=sobi2_downloads/
17/01321_highwayatnighttheend_1280x1024.jpg&amp;sizex=1280&amp;sizey=1024">
<img src="http://www.distriad.nl/thumb.php?file=sobi2_downloads/
17/01321_highwayatnighttheend_1280x1024.jpg&amp;sizex=200&amp;sizey=200">
</a>


work for me
you can actually create a test page with just these two and it will
work fine

On Mar 18, 8:58 am, EpleVC <i...@eple.nl> wrote:
> Problem still not solved :( Can someone have a look please? Thanks
> very much.
>
> On 11 mrt, 19:50, EpleVC <i...@eple.nl> wrote:
>
> > Hi there,
>
> > Fancybox works like a charm on all the pages of our joomla site,
> > except for search results generated by Sobi2. This problem seems to
> > come up because it is loaded within a DOM element.
>
> > Standard website:http://www.distriad.nl/(clickon the images &
> > video; fancybox works)
> > Search results:http://www.distriad.nl/index.php?sobi2Search=wallpaper&search=Zoek&se...
> > (click on image; fancybox doesn't work)
>
> > Javascript:
>
> > <script type="text/javascript">
> > jQuery(document).ready(function() {
> >         jQuery("a.fancybox").fancybox({
> >                 'hideOnContentClick': true,
> >                 'titleShow'                     : false,
> >                 'onComplete': function() {
> >                  jQuery("#fancybox-outer").bind("contextmenu", function () {
> >                   jQuery.fancybox.close();
> >                   return false;
> >                  });
>
> >                 }
> >         });
> >     jQuery('a.popupvideo').fancybox({
> >                         'autoScale'             : false,
> >                         'padding'           : 0,
> >                         'hideOnContentClick': false,
> >                         'titleShow'                     : false,
> >                         'callbackOnClose': function() { jQuery
> >                         ('#fancy_content').empty(); }
> >           });});
>
> > </script>
>
> > (because sobi uses mootools the $-sign is replaced with jQuery to
> > prevent javascript conflicts)
>
> > Does someone have any clues to solve this? Many thanks in advance!
>
> > EpleVC

Populus

unread,
Mar 19, 2010, 7:49:32 AM3/19/10
to fancybox
Any error messages?
The code looks fine but it could be conflicting with something else,
and error messages (from browser) would be very helpful

> > > Standard website:http://www.distriad.nl/(clickonthe images &

EpleVC

unread,
Mar 24, 2010, 5:44:00 AM3/24/10
to fancybox
No javascript errors at all. The search results are created with AJAX
and then loaded into the HTML. A similar problem can be found here
http://groups.google.com/group/fancybox/browse_thread/thread/e68af56fb084e801/cfe0423705efc653?lnk=gst

> > > > Standard website:http://www.distriad.nl/(clickontheimages &

Jim

unread,
Mar 24, 2010, 7:41:28 PM3/24/10
to fancybox
Have a look at this thread:

http://groups.google.com/group/fancybox/browse_thread/thread/cfe454337ba4763e

On Mar 24, 5:44 am, EpleVC <i...@eple.nl> wrote:
> No javascript errors at all. The search results are created with AJAX

> and then loaded into the HTML. A similar problem can be found herehttp://groups.google.com/group/fancybox/browse_thread/thread/e68af56f...

Reply all
Reply to author
Forward
Message has been deleted
0 new messages