我正在使用以下设置页面(同位素砌体系统顺便完成,但不是那种方式):
<script type="text/javascript">
$(function(){
var $container = $('#wall');
$container.isotope({
itemSelector : '.block2',
getSortData : {
name : function ( $elem ) {
return $elem.find('.name').text();
}
},
getSortData : {
site : function ( $elem ) {
return $elem.find('.site').text();
}
}
});
$container.infinitescroll({
navSelector : '#page_nav', // selector for the paged navigation
nextSelector : '#page_nav a', // selector for the NEXT link (to page 2)
itemSelector : '.block2', // selector for all items you'll retrieve
loading: {
finishedMsg: 'No more pages to load.',
img: 'http://i.imgur.com/qkKy8.gif'
}
},
// call Isotope as a callback
function( newElements ) {
$container.isotope( 'appended', $( newElements ) );
}
);
});
</script>
示例数据:
<div class="block2">
<li class="list_item">
<div class="list_item_view">
<div class="list_item_name" title="JETS Journey 2011" style=font-size:11px;>
<span class="name">Jets Journey 2011</span></div>
<div class="site"><span class="site">abc.com</span></div></div></div>
<div class="block2">
<li class="list_item">
<div class="list_item_view">
<div class="list_item_name" title="Killers" style=font-size:11px;>
<span class="name">Killers</span></div>
<div class="site"><span class="site">ydc.com</span></div></div></div>
<div class="block2">
<li class="list_item">
<div class="list_item_view">
<div class="list_item_name" title="Best yet" style=font-size:11px;>
<span class="name">Best yet</span></div>
<div class="site"><span class="site">cagey.com</span></div></div></div>
并调用排序更改:
<a href=#sortBy=name>name</a> <a href=#sortBy=site>site</a>
但是当我点击排序链接时没有任何反应 - 我在某个地方错过了一个简单的点吗?
答案 0 :(得分:2)