![]() |
Hi guys. I need help to load data as user scrolls down. I have searched online for a solution that suites the way i am displaying the data with no luck. Not even sure if what am trying is possible.
I have a controller that returns all the companies in the database as follows PHP Code: public function getAllCompanies() Then on the view i use Ajax and Jquery to retrieve and display the results as follows Code: $(document).ready(function(){ Then on the view i have a div that prints results that have been returned. So on posts i have search online mostly they are for handling data passed to the view from controller using php pagination function. Is it possible for me to get the same auto loader using the method i have illustrated above? This is the div that prints results Code: <div class="row" id="searchpreview" style="padding-top:10px;"></div>
This may help you out.
jQuery load more data on scroll What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-10-2023, 10:42 PM)InsiteFX Wrote: This may help you out. Thank you so much. I try it out and revert with results. Much appreciated Fam
(04-10-2023, 10:42 PM)InsiteFX Wrote: This may help you out.Thank you so much for pointing me to the right direction. Managed make it work using the implementation you suggested i look at. This is what work for me. I really appreciate your help. Thank you. var flag = 0; var scrollLoad = true; Code: $(window).scroll(function() {
It would be great to have more hints about using HTMX in the Codeigniter 4+ apps
e.g. for who experimented with HTMX: is it possible to achieve what in the topic start with HTMX? Thank you |
Welcome Guest, Not a member yet? Register Sign In |