Help with WordPress ajax and fancybox.

  • # June 10, 2013 at 5:55 pm

    Can some please troubleshoot this. My fancybox script doesnt work unless I refresh the page. There are no errors in console.

    The two scripts that I used to reload here.


    function addPhotoSwipe(){
    if(typeof jQuery(".ngg-gallery-thumbnail a").photoSwipe == 'undefined' ){
    jQuery(document).ready(function() {
    images = jQuery('a.myfancybox')

    if( typeof jQuery(images).fancybox != 'function' || images.length == 0 ){
    jQuery('#fancybox-wrap').css('display', 'none');

    jQuery(images).fancybox({ 'zoomSpeedIn':500, 'zoomSpeedOut':500, 'overlayShow':true, 'overlayOpacity':0.3 });
    }); lines 545-556

    	jQuery('#' + AAPL_content).fadeIn("slow", function() {
    var menulink = document.getElementsByClassName('menu-link')[0];
    jQuery('html, body').animate({
    'scrollTop' : menulink.offsetTop

    So close, just one fix and this project is finished, please just take a look.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed