我有 jquery isotope setup 并创建了一些过滤器。当我创建我选择一个过滤器时,同位素会做一个很好的小动画。我想在动画结束时触发警报。
此示例演示了发生的动画:
http://isotope.metafizzy.co/demos/filtering.html
有任何想法吗?
这是点击过滤器的代码:
$('.filter').on( 'click', 'a', function( event ) {
event.preventDefault();
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('selected') ) {
return false;
}
// console.log('hello world');
var $optionSet = $this.parents('.option-set');
var group = $optionSet.attr('data-filter-group');
options.comboFilters[ group ] = $this.attr('data-filter-value');
$.bbq.pushState( options );
// COUNT
var $filtered = $('#isotope-container').data('isotope').$filteredAtoms;
// get count of all filtered item
alert($filtered.length);
// get count of all filtered items that match a selector
//$filtered.filter('.blue').length;
});