WordPress.org

Ready to get started?Download WordPress

Forums

Jquery Fancybox (6 posts)

  1. obidos
    Member
    Posted 1 year ago #

    Hi there,

    I am trying to install and use Jquery Fancybox downloaded from
    Here

    I cannot get it working with WordPress I just get the larger image opening in the new window. I have right clicked and view source and clicked on the fancybox.js file and it all links in correctly.

    Any help would be great. I have it working in a plain HTML file so understand it all. It's just within wordpress it breaks.

    Here is my code:-

    <div class="thumbs">
                    <a class="fancybox" href="<?php bloginfo('template_directory'); ?>/img/gallery-large.jpg" rel="some-photos">
                    <img src="<?php bloginfo('template_directory'); ?>/img/gallery-thumb.jpg" />
                    </a>
    
                    <a class="fancybox" href="<?php bloginfo('template_directory'); ?>/img/gallery-large.jpg" rel="some-photos">
                    <img src="<?php bloginfo('template_directory'); ?>/img/gallery-thumb.jpg" />
                    </a>
    
                    <a class="fancybox" href="<?php bloginfo('template_directory'); ?>/img/gallery-large.jpg" rel="some-photos">
                    <img src="<?php bloginfo('template_directory'); ?>/img/gallery-thumb.jpg" />
                    </a>
    			</div>
    $(".fancybox").fancybox();
  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Why not just use a Fancybox plugin?

  3. obidos
    Member
    Posted 1 year ago #

    Hello,

    I don't really want to install plugins and I have not had any trouble using lightbox scripts before.

    Will it not work unless you use a plugin?

    Thanks,

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    It will work but you'll need to learn how to enqueue scripts in WordPress and how to use jQuery noConflct wrappers for the js script itself.

  5. obidos
    Member
    Posted 1 year ago #

    Plugin not working either.

    I have jquery installed and only other code linked in is the jquery.isotope plugin.

    I'm lost.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    What plugins have you tried?

Topic Closed

This topic has been closed to new replies.

About this Topic