我正在为页面设置以下内容(顺便说一下,同位素砌体系统工作得很好,只是不是那种):
<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>
但是当我单击排序链接时根本没有任何反应——我是否在某处遗漏了一个简单的点?