The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Creating a Load More button, Need Some Help.
So this is petty standard feature of most sites today, load more by pressing a button. So what Im trying to do is make an ajax request to a duplicated modified forumdisplay.php to load the next page of threads automatically.
Heres the procedure. In my forumdisplay template I have created an ajax script: Code:
<script> $(document).ready(function(){ $('.load-more').click(function(){ perpage = $perpage + 10; $('.block-threadlist').load('loadmore.php', { perPageNew: perpage }); }); }); </script> the notable changes are: I have included Code:
$perPageNew = $_POST['perPageNew']; the loadmore template ONLY includes $threadbits loading loadmore.php in browser, this works exactly how I expect it to, with only showing the threadbits of each thread, un-styled due to not being rendered with the head or any other templates. That's ok though because once they are loaded where they are supposed to be, they should be styled. The problem comes when I hit my button. Code:
<button type="button" class="btn btn-primary btn-lg load-more">Load More</button> Quote:
Can anyone assist me with getting this to function properly? |
Благодарность от: | ||
yilmaz |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|