2

Every thing is working the way I want it, the only issue is that its not scaling when you click on the filters (one bed/two bed) its only only fading. The original quciksand example fades and scales between filters

Here is my example http://theoaks.turnpostadmin.com/floor-plans/

My code

    // jQuery Quicksand project categories filtering


 jQuery.noConflict();
 jQuery(document).ready(function($){
// Clone applications to get a second collection
var $data = $(".portfolio-content").clone();

//NOTE: Only filter on the main portfolio page, not on the subcategory pages
$('.portfolio-main li').click(function(e) {
    $(".filter li").removeClass("active");  
    // Use the last category class as the category to filter by. This means that multiple categories are not supported (yet)
    var filterClass=$(this).attr('class').split(' ').slice(-1)[0];

    if (filterClass == 'all-projects') {
        var $filteredData = $data.find('.project');
    } else {
        var $filteredData = $data.find('.project[data-type=' + filterClass + ']');
    }
    $(".portfolio-content").quicksand($filteredData, {
        duration: 750,
        easing: 'swing',
        attribute: 'data-id', // attribute to recognize same items within source and dest
        adjustHeight: 'auto', // 'dynamic' animates height during shuffling (slow), 'auto' adjusts it before or after the animation, false leaves height constant
        useScaling: true, // disable it if you're not using scaling effect or want to improve performance
        enhancement: function(c) {}, // Visual enhacement (eg. font replacement) function for cloned elements
        selector: '> *',
        dx: 0,
        dy: 0
    }, function() { 
    });     
    $(this).addClass("active");             
    return false;
});
   });

Here is the original http://razorjack.net/quicksand/

Jamison
  • 91
  • 1
  • 1
  • 8

1 Answers1

1

Did you add the required plugins to your project (as mentioned on the original website)?

If not, download these 2 plugins first :

https://github.com/zachstronaut/jquery-animate-css-rotate-scale/blob/master/jquery-animate-css-rotate-scale.js

https://github.com/zachstronaut/jquery-css-transform/blob/master/jquery-css-transform.js

I know that in the main website they say that you only have to add the first one, but I tried and it didn't work until I added the second one. Then don't forget to include the link to these plugins in the head tag :

<script type="text/javascript" src="js/jquery-css-transform.js" ></script>
<script type="text/javascript" src="js/jquery-animate-css-rotate-scale.js" ></script>

I hope it'll work ;)

Mehdiway
  • 10,337
  • 8
  • 36
  • 68