$catcount 在传递时保持不变,即使它改变了它的值,url 发送相同的旧值
<script type="text/javascript">
var $catcount=1;
jQuery(document).ready(
function() {
jQuery('.scroll_container').scrollExtend(
{
'target': 'div#scroll_items',
'url': 'populates.php',
'newElementClass': 'list_item more_content',
'ajaxSettings': {'data':'cid='+$catcount},
'onSuccess':function(){
jQuery('.scroll_container').scrollExtend('enable');
$catcount++;
alert($catcount);
}
}
);
}
);
</script>