1

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 ?

Benn
  • 4,840
  • 8
  • 65
  • 106

2 Answers2

1

In your Quicksand Callback function, under adjust_height(); add this:

var filteredSize = $filteredData.size();

alert(filteredSize);

// If the above var doesn't work, try this variant.
// var filteredSize = $($filteredData).size();
arttronics
  • 9,957
  • 2
  • 26
  • 62
1

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

Everything working as expected.

Try to update quicksand and jquery js files.

rogal111
  • 5,874
  • 2
  • 27
  • 33
  • thnx I placed it on the wrong place, had 2 quicksands runing , fixed here http://jsfiddle.net/gbu8Y/15/ – Benn Jul 20 '12 at 21:59