I am using jquery infinite scroll plugin for pagination and it is working good when running the page directly to the browser. But if I call the page through jquery load method it doesn't work. I can get the first set of results and then I can't even see the loader. Please help. Thanks
Code that uses yii infinite scroll extension
$this->widget('ext.yiinfinite-scroll.YiinfiniteScroller', array(
'contentSelector' => '#container',
'itemSelector' => 'ul.wlist',
'loadingText' => 'Loading next 15 rows...',
'donetext' => 'Loading Completed.',
'pages' => $pages,
));
Open bootstrap model popup while click of a button
<button name="add_more" class="btn btn-primary" id="add_more" type="submit" onClick="show_dest();">Add More?</button>
<a data-toggle="modal" data-target="#myModal" style="cursor:pointer;"><span id="click_frm" style="display:none">spn</span></a>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="width:70%; margin-left:auto; margin-right:auto;">
<div class="modal-content">
<div class="modal-body" style="display:inline-block; width:100%;" >
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="position:absolute; top:10px; right:10px;" >×</button>
<div id="res_search" style=" height:500px; overflow:auto; margin-top:-20px;"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function show_dest()
{
var r_id=document.getElementById('reg_id').value;
$('#click_frm').trigger('click');
}
$(document).ready(function(){
var reg_id=document.getElementById('reg_id').value;
$("#res_search").load("/site/selectmore", {'reg_id':reg_id}, function(){
});
});
</script>