mejoras en la api

This commit is contained in:
humano 2017-11-06 12:59:58 -05:00
parent c0a88bf2ea
commit b91c558618
2 changed files with 18 additions and 34 deletions

View File

@ -7,7 +7,11 @@
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css?" > <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css?" >
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
var count = 1;
loadArticle(1);
loadArticle(2);
loadArticle(3);
var count = 4;
$("div").scroll(function () { $("div").scroll(function () {
var offset = $('#scroll-content div').length; var offset = $('#scroll-content div').length;
var $this = $(this); var $this = $(this);
@ -51,7 +55,16 @@
} }
function loadArticle(pageNumber){
});
});
function loadArticle(pageNumber){
var newDiv = document.createElement("div"); var newDiv = document.createElement("div");
newDiv.setAttribute("class", "container"); newDiv.setAttribute("class", "container");
@ -77,40 +90,11 @@
} }
});
});
</script> </script>
</head> </head>
<body> <body>
<div class='container' style="overflow-y: scroll; overflow-x: hidden; height: 400px; border: 1px solid red;"> <div class='container' style="overflow-y: scroll; overflow-x: hidden; height: 400px; border: 1px solid red;">
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p> <p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p> <p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p> <p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<p>This is the div content</p>
<div id="wrapper"> <div id="wrapper">
<div id="scroll-content"> <div id="scroll-content">
<div id='posts'></div> <div id='posts'></div>

View File

@ -31,7 +31,7 @@ if(!isset($_REQUEST['formato'])) {
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json($datos); echo json($datos);
}else{ }else{
echo "".consultar_contenido_formulario("$datos[id]","$datos[registros]","$datos[pagina]","$datos[formato]",'',"li"); echo "$datos[pagina] ".consultar_contenido_formulario("$datos[id]","$datos[registros]","$datos[pagina]","$datos[formato]",'',"li");
} }
//echo "hola /// $_REQUEST[id] // " ; //echo "hola /// $_REQUEST[id] // " ;