Search code examples
javascriptjqueryrolloverquicksand

jQuery Quicksand + Captify (Rollover Script)


so I have a little issue with my jQuery Captify (Caption on image rollovers) and Quicksand (Image filtering system) not working so well together. When the page loads, my Captify works well when I roll my mouse over the images, however as soon as I click a link to filter my thumbnails, the captify script stops working.

I tried to call the captify script every x seconds, but I'm either not doing it correctly or it's just not the right solution. Can anyone help me out? The site can be found at http://www.galaxyturbo.net/new/index.php

If you have Firebug or similar developer tools like in Google Chrome, you can take a look at my code from there, I just didn't want to perhaps spam this page. Thanks SO much in advance if you can help me out here, I'm really desperate.


Solution

  • Well, I would say we both need to learn more JavaScript, but I had the same problem, and here is how you make it work :

    What you need to do is RECALL THE CAPTIFY FUNCTION AFTER THE QUICKSAND CLONNING ! so look for the JS code for quicksand, look for :

        $holder.quicksand($filteredData, {
            duration: 800,
            easing: 'easeInOutQuad'
        });
        return false;
    

    that should look like this :

        $holder.quicksand($filteredData, {
            duration: 800,
            easing: 'easeInOutQuad'
        },
        // RECALL CAPTIFY  ===============================
           function() { $('img.captify').captify({
            speedOver: 'fast',
            speedOut: 'normal',
            hideDelay: 500,
            animation: 'slide',
            prefix: '',
            opacity: '0.7',
            className: 'caption-bottom',
            position: 'bottom',
            spanWidth: '100%'
            });
           }
        // RECALL CAPTIFY  ==============================
        );
        return false;
    

    hope that helps ! also, you will have to do the same with other scripts, like LightBox or PrettyPhoto .