1$(document).ready(function () { 2 3 // SCROLL PORTADA 4 Cont_Portada=0; 5 Sigue_Portada = $("#Para_Scroll_Portada").val(); 6 7 // SCROLL CATEGORIA 8 Cont_Categoria=0; 9 Sigue_Categoria = $("#Para_Scroll_Categoria").val(); 10 Alias_Categoria = $("#Para_Scroll_Categoria_Alias").val(); 11 12 $('.alert').click(function () { 13 $('.alert').hide() 14 }) 15 16 $('#correoSus').keyup(function (e) { 17 var value = $(this).val() 18 var miDato = { 19 'c': value 20 } 21 $.ajax({ 22 type: 'POST', 23 url: '/src/app/contenidos/modelo/comprobar_email.php', 24 data: miDato, 25 dataType: 'json', 26 success: function (data) { 27 $('#repedito').val(data[0]) 28 } 29 }) 30 }) 31 32 $('#correoSus').click(function () { 33 var value = $('#correoSus').val() 34 var miDato = { 35 'c': value 36 } 37 $.ajax({ 38 type: 'POST', 39 url: '/src/app/contenidos/modelo/comprobar_email.php', 40 data: miDato, 41 dataType: 'json', 42 success: function (data) { 43 $('#repedito').val(data[0]) 44 } 45 }) 46 }) 47 48 $('#buscador_contenidos').click(function () { 49 var value_buscador = $('#buscador_contenidos').val() 50 if (value_buscador.length == 0) { 51 $('#BusquedaResultado').hide() 52 } else { 53 var miDato = { 54 'b': value_buscador 55 } 56 $.ajax({ 57 type: 'POST', 58 url: '/src/app/contenidos/modelo/buscar.php', 59 data: miDato, 60 dataType: 'html', 61 success: function (data) { 62 $('#BusquedaResultado').show() 63 $('#BusquedaResultado').html(data) 64 } 65 }) 66 } 67 }); 68 69 $("#buscador_contenidos").blur(function(){ 70 setTimeout(function() { 71 $('#BusquedaResultado').hide() 72 },150); 73 }) 74 75 $('#buscador_contenidos').keyup(function (e) { 76 var value_buscador = $('#buscador_contenidos').val() 77 var value = $(this).val() 78 var miDato = { 79 'b': value 80 } 81 $.ajax({ 82 type: 'POST', 83 url: '/src/app/contenidos/modelo/buscar.php', 84 data: miDato, 85 dataType: 'html', 86 success: function (data) { 87 if (value_buscador == '') { 88 $('#BusquedaResultado').hide() 89 } else { 90 $('#BusquedaResultado').show() 91 $('#BusquedaResultado').html(data) 92 } 93 } 94 }) 95 }) 96 97 $("#buscador_contenidos").keypress(function(e) { 98 if(e.which == 13) { 99 var value_buscador = $('#buscador_contenidos').val() 100 var url = '/buscar&p=' + value_buscador 101 if (value_buscador != '') { 102 setTimeout(function() { 103 $(location).attr('href', url) 104 },100); 105 } 106 } 107 }); 108 109 $(".Buscador a #ico-sear").click(function () { 110 var value_buscador = $('#buscador_contenidos').val() 111 var url = '/buscar&p=' + value_buscador 112 if (value_buscador != '') { 113 setTimeout(function() { 114 $(location).attr('href', url) 115 },100); 116 } 117 }); 118 119}); 120 121$(window).scroll(function(){ 122 if ($("#ParaCargador").length) { 123 var paraCargador = $("#ParaCargador").offset(); 124 var paraCargador2 = paraCargador.top; 125 var scrollTop = $(window).scrollTop(); 126 var ventanaheight = $(window).height(); 127 var scrollBottom = parseInt(scrollTop) + parseInt(ventanaheight); 128 var mas_uno = parseInt(paraCargador2) + parseInt(100); 129 130 if (((scrollBottom > paraCargador2) && (scrollBottom < mas_uno)) && (Cont_Portada <= Sigue_Portada)) { 131 Cont_Portada++; 132 var miDato2 = { 133 'C_P': Cont_Portada 134 } 135 $.ajax({ 136 type:'POST', 137 url: '/src/app/contenidos/modelo/cargador_portada.php', 138 data: miDato2, 139 beforeSend:function(html){ 140 $('#Cargando_Cargador').show() 141 }, 142 success:function(html){ 143 $('#Cargando_Cargador').hide() 144 $('#postList').append(html); 145 } 146 }); 147 } 148 } 149}); 150 151$(window).scroll(function(){ 152 if ($("#ParaCargador").length) { 153 var paraCargador = $("#ParaCargador").offset(); 154 var paraCargador2 = paraCargador.top; 155 var scrollTop = $(window).scrollTop(); 156 var ventanaheight = $(window).height(); 157 var scrollBottom = parseInt(scrollTop) + parseInt(ventanaheight); 158 var mas_uno = parseInt(paraCargador2) + parseInt(100); 159 160 if (((scrollBottom > paraCargador2) && (scrollBottom < mas_uno)) && (Cont_Categoria <= Sigue_Categoria)) { 161 Cont_Categoria++; 162 var miDato2 = { 163 'C_C': Cont_Categoria, 164 'alias': Alias_Categoria 165 } 166 $.ajax({ 167 type:'POST', 168 url: '/src/app/contenidos/modelo/cargador_categoria.php', 169 data: miDato2, 170 beforeSend:function(html){ 171 $('#Cargando_Cargador').show() 172 }, 173 success:function(html){ 174 $('#Cargando_Cargador').hide() 175 $('#postList').append(html); 176 } 177 }); 178 } else { 179 // 180 } 181 } 182}); 183 184function Suscribete () { 185 $('#btnSuscribir').hide() 186 $('.btnCargandoSus').show() 187 188 var email_S = $('#correoSus').val() 189 var nombre_S = $('#nombreSus').val() 190 var repetido_S = $('#repedito').val() 191 192 if (email_S.indexOf('@', 0) == -1 || email_S.indexOf('.', 0) == -1) { 193 $('#btnSuscribir').show() 194 $('.btnCargandoSus').hide() 195 $( "#correoSus" ).focus(); 196 $("#no_valido").show(); 197 $("#ya_registrado").hide(); 198 $("#bien").hide(); 199 return false; 200 } else if (repetido_S == 0) { 201 $('#btnSuscribir').show() 202 $('.btnCargandoSus').hide() 203 $( "#correoSus" ).focus(); 204 $("#no_valido").hide(); 205 $("#ya_registrado").show(); 206 $("#bien").hide(); 207 return false;
208 } else { 209 $('#btnSuscribir').hide() 210 $('.btnCargandoSus').show() 211 var url = '/src/app/contenidos/modelo/suscribir.php'; // El script a dónde se realizará la petición. 212 var parametros = { 213 'email': email_S, 214 'nombre': nombre_S 215 } 216 $.ajax({ 217 type: 'POST', 218 url: url, 219 data: parametros, 220 success: function (data) { 221 $('#btnSuscribir').show() 222 $('.btnCargandoSus').hide() 223 $( "#correoSus" ).val(""); 224 $( "#nombreSus" ).val(""); 225 $("#no_valido").hide(); 226 $("#ya_registrado").hide(); 227 $("#bien").show(); 228 $.ajax({ 229 type: 'POST', 230 url: '/src/app/contenidos/modelo/enviar_correos.php', 231 data: parametros, 232 success: function (data) { 233 // 234 } 235 }) 236 } 237 }) 238 return false 239 } 240}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.