I have spend ages figuring out how to get quicksand to work with a select and option form instead of href links. Now I have a problems because the animation is stuttery. I can't get it smooth. It starts off alright then snaps back to the left. You can see an online example:
http://freecss.info/ScreencastTutorials/archive.html
Any ideas? I have thought of many things and experimented but no luck. Other scripts are compatible, tried changing to fixed widths and tried add a holder div with overflow:hidden.
Relevant jquery:
var $holder = $('ul#archive-full');
var $data = $holder.clone();
var mySelect = $('#mySelect');
mySelect.change(function() {
var index = mySelect[0].selectedIndex;
var element = mySelect[0].options[index];
var $filterType = $(element).attr('value')
if ($filterType == 'all') {
var $filteredData = $data.find('li:not(li ul li)');
}
else {
var $filteredData = $data.find('li[data-type~="' + $filterType + '"]');
}
$holder.quicksand($filteredData, {
duration: 800,
easing: 'easeInOutQuad'
});
return false;
});
Relevant HTML
<select name="mySelect" id="mySelect" selected value="all">
<option name="all" value="all">Free & Premium</option>
<option name="free" value="free">Free Only</option>
<option name="premium" value="premium">Premium Only</option>
</select>
<ul id="archive-full">
<li data-id="id-1" data-type="all premium">/li>
</ul>
– Michael Jun 19 '11 at 20:53