From e7768cf14621533cb4b9192941529a5d685f725c Mon Sep 17 00:00:00 2001 From: humano Date: Mon, 6 Nov 2017 18:11:35 -0500 Subject: [PATCH] reuso de infinite scroll --- index.php | 48 ++++++++++++++------------------------------- milfs/js/scripts.js | 20 +++++++++++++++++++ 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/index.php b/index.php index 4830ff1..e4c5bdb 100644 --- a/index.php +++ b/index.php @@ -405,6 +405,9 @@ if ($variable !=''){ "; + + $registros=1; + $plantilla="landingpage"; $librerias_cabeza ="$presentacion_cabeza $librerias_galeria @@ -422,13 +425,14 @@ if('serviceWorker' in navigator) { diff --git a/milfs/js/scripts.js b/milfs/js/scripts.js index 535fc72..b8aa3ce 100644 --- a/milfs/js/scripts.js +++ b/milfs/js/scripts.js @@ -1,4 +1,24 @@ +function loadArticle(pageNumber,id,plantilla,registros,scroll) { + var newDiv = document.createElement('div'); + document.getElementById(scroll).appendChild(newDiv); + + $.ajax({ + + url: 'milfs/api.php?id='+id+'&tipo=simple&formato=li&plantilla='+plantilla+'®istros='+registros+'&pagina=' + pageNumber, + type: 'POST', + dataType: 'html', + success: function(html) { + // $('#scroll-contentx').append(html); + var contenido = html; + newDiv.innerHTML = contenido; + } + + }); + + } + + function leer_exif(campo,campo_mapa) { // alert(campo) // var file = e.target.files[0]