Search code examples
jqueryjquery-callbackquicksand

Jquery quicksand callback


I am trying to return the number of elements after the quicksand has arranged them

http://razorjack.net/quicksand/

this should kinda work

function adjust_height (){
                 var getall = $('#wrapper .li').length;
                 console.log(getall);
}
        $(".portfolio-content").quicksand($filteredData, {
            duration: 800,
            easing: 'easeInOutQuad',
            adjustHeight:false

        },function (){
                  adjust_height ();

               });  

but I am getting the previous set length , example , if there is 4 , and on click I have 2 ,the count is 4 , on next click count is 2 . seems like I am late with my count

what am I doing wrong ?


Solution

  • Look at this example: http://jsfiddle.net/EVagr/1/

    Everything working as expected.

    Try to update quicksand and jquery js files.