mandiwise / isotope-posts

[RETIRED] This plugin allows you to use Metafizzy's Isotope javascript plugin to display feeds of WordPress posts with a simple shortcode. Works with custom post types and custom taxonomies too.
GNU General Public License v2.0
55 stars 17 forks source link

modify to fade, not hide, filtered posts? #18

Closed wordfool closed 9 years ago

wordfool commented 9 years ago

Thanks for the great plugin... does exactly what I was looking for without any bloat. One minor modification I have attempted and failed at, however, is to have the filtered posts fade in place and not disappear (I'm using it for lists of post titles rather than titles+excerpts). I'm after the same effect as illustrated in David Desandro's example here: http://codepen.io/desandro/pen/drpJK/

I've tried adding the new hiddenStyle and visibleStyle to your code but there's something else apparently going on because they don't work as they should (items fade as per the new hiddenStyle attribute, but then disappear). Here's what I tried:

    var $container = $('#iso-loop').imagesLoaded( function () {
        $container.fadeIn().isotope({
            itemSelector : '.iso-post',
            layoutMode : iso_vars.iso_layout,
            filter : initialFilter,
            hiddenStyle: {
              opacity: 0.5
            },
            visibleStyle: {
              opacity: 1
            }           
        });
    });
mandiwise commented 9 years ago

Apologies for the delay of my response. Not sure if you figured this out, but unfortunately this customization is a little outside the scope of what I can provide for free support with this plugin right now.