google-code-export / fancybox

Automatically exported from code.google.com/p/fancybox
1 stars 0 forks source link

The script affects all my images on the page #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
It works fine, but it affects every link on the page. How can I add the
effect just to certain links on the page?

What version of the product are you using? On what operating system?
Firefox 3.0. 10/ Windows XP

Original issue reported on code.google.com by luis...@gmail.com on 26 May 2009 at 11:53

GoogleCodeExporter commented 9 years ago
I am having the exact same proble, fancybox is affecting every single link on 
the
page, how can i fix this??

Original comment by ismaelgo...@gmail.com on 9 Jun 2009 at 1:23

GoogleCodeExporter commented 9 years ago
LOL nevermind i found the fix, see when you call the fancy box jquery function 
it is
like this:

<script type="text/javascript">
        $(document).ready(function() {
            $("a").fancybox();
        });
    </script>

"a" means that every link triggers fancybox, so just add a class name to your 
image
links in my case <a class="gallery"...

and set the function to this:

<script type="text/javascript">
        $(document).ready(function() {
            $("a.gallery").fancybox();
        });
    </script>

and that will make all the gallery links work with fancybox, and all other 
links will
behave as normal.

hope this helps.

Original comment by ismaelgo...@gmail.com on 9 Jun 2009 at 1:30

GoogleCodeExporter commented 9 years ago
thank you for posting this, i was having the same issue.

Original comment by sean...@gmail.com on 10 Jun 2009 at 4:58

GoogleCodeExporter commented 9 years ago
Thaks a lot. I had same problem....

Original comment by mikesh...@gmail.com on 18 Oct 2009 at 3:18

GoogleCodeExporter commented 9 years ago

Original comment by janis.sk...@gmail.com on 29 Oct 2009 at 4:05