jQuery lightbox plugins not working (WordPress)

I am totally perplexed. I’ve tried maybe 10 different WordPress plugins to try to get a lightbox playing Vimeo. None are working.

I’m manually uploading fancybox 2 to a website I’m building and have followed all of the instructions (as far as I know). It seems like the jQuery isn’t functioning, though all the links are loading.

Read More

I’m working with this last example (media helper) to try to get it to work.

HTML

    <iframe src="http://player.vimeo.com/video/65191942?title=0&amp;byline=0&amp;portrait=0&amp;color=dd4c23" width="500" height="282" frameborder="0" class="fancybox-media" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p>

And javascript is just before the </body> tag is

<script>
$(document).ready(function() {
    $('.fancybox-media').fancybox({
        openEffect  : 'none',
        closeEffect : 'none',
        helpers : {
            media : { true }
        }
    });
});
</script>

Again, all css and js files are called in the header just fine.

And you can see it up and running here.

Related posts

Leave a Reply

1 comment

  1. Did you check the console for errors?

    I can see these two:

    Uncaught TypeError: Cannot call method 'getElementsByClassName' of null new.stevenspiel.com/compositions/:137
    Uncaught TypeError: Object [object Object] has no method 'fancybox' 
    

    You should fix this error first.

    If you look at line 137, you see this:

    var $body = document.body
        , $menu_trigger = $body.getElementsByClassName('menu-trigger')[0];
    

    looks like you have a “,” instead of a “;” to end the first line.