Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

254
Views
El desplazamiento infinito no funciona en el problema de dispositivos móviles (dispositivos táctiles)

Hice un script de desplazamiento infinito y funciona perfectamente en el escritorio, pero no funciona en el móvil. Probé todas las soluciones para problemas relacionados aquí, pero no funcionó tan bien o di valores repetidos.

Apreciaría cualquier ayuda

aquí está mi guión:

 <script> $(document).ready(function() { $('#loading').show(); //Original ajax request for loading first posts $.ajax({ url: "includes/handlers/ajax_load_translators.php", type: "POST", data: "page=1&userLoggedIn=" + userLoggedIn, cache:false, success: function(data) { $('#loading').hide(); $('.posts_area').html(data); } }); $(window).scroll(function() { var height = $('.posts_area').height(); //Div containing posts var scroll_top = $(this).scrollTop(); var page = $('.posts_area').find('.nextPage').val(); var noMorePosts = $('.posts_area').find('.noMorePosts').val(); if ((document.body.scrollHeight == document.body.scrollTop + window.innerHeight) && noMorePosts == 'false') { $('#loading').show(); var ajaxReq = $.ajax({ url: "includes/handlers/ajax_load_translators.php", type: "POST", data: "page=" + page + "&userLoggedIn=" + userLoggedIn, cache:false, success: function(response) { $('.posts_area').find('.nextPage').remove(); //Removes current .nextpage $('.posts_area').find('.noMorePosts').remove(); //Removes current .nextpage $('.posts_area').find('.noMorePostsText').remove(); //Removes current .nextpage $('#loading').hide(); $('.posts_area').append(response); } }); } //End if return false; }); //End (window).scroll(function())
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!