$ account在传递时保持不变,即使它更改了其值,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>
答案 0 :(得分:1)
<script type="text/javascript">
var $catcount=1;
jQuery(document).ready(
function() {
jQuery('.scroll_container').scrollExtend(
{
'target': 'div#scroll_items',
'url': function() {
return 'populates.php?cid='+$catcount;
},
'newElementClass': 'list_item more_content',
'onSuccess':function(){
jQuery('.scroll_container').scrollExtend('enable');
$catcount++;
}
});
}
);
</script>