implementacion lazy en el index

This commit is contained in:
humano 2018-03-12 09:56:57 -05:00
parent 00d0a1529a
commit d3f60cb814
2 changed files with 4 additions and 2 deletions

View File

@ -1290,6 +1290,8 @@ echo $css_adicional;
$(function() { $(function() {
$('.lazy').Lazy({ $('.lazy').Lazy({
// your configuration goes here // your configuration goes here
combined: true,
delay: 1000,
scrollDirection: 'vertical', scrollDirection: 'vertical',
effect: 'fadeIn', effect: 'fadeIn',
visibleOnly: true, visibleOnly: true,

View File

@ -5303,11 +5303,11 @@ while( $row = mysqli_fetch_array( $sql ) ) {
} }
$i++; $i++;
if($row['imagen'] !="") { if($row['imagen'] !="") {
$logo="<img class='lazy img img-responsive img-rounded' style='background-image: url('milfs/images/secure/?file=150/$row[imagen]')' alt='$row[razon_social]' data-src='milfs/images/secure/?file=300/$row[imagen]' >"; $logo="<img class='lazy img img-responsive img-rounded' alt='$row[razon_social]' data-src='milfs/images/secure/?file=300/$row[imagen]' src='milfs/images/secure/?file=150/$row[imagen]' >";
} }
else { else {
$logo_empresa = remplacetas('empresa','id',"1",'imagen',''); $logo_empresa = remplacetas('empresa','id',"1",'imagen','');
$logo="<img class=' lazy img img-responsive' style='' data-src='milfs/images/sinimagen.jpg' alt='$row[razon_social]'>"; $logo="<img class=' lazy img img-responsive' data-src='milfs/images/sinimagen.jpg' src='milfs/images/sinimagen.jpg' alt='$row[razon_social]'>";
} }
// $slogan= substr($row[slogan],0, $length = 100).""; // $slogan= substr($row[slogan],0, $length = 100)."";
$slogan = $row['slogan']; $slogan = $row['slogan'];