forked from qwerty/tupali
implementacion lazy en el index
This commit is contained in:
parent
222aae908e
commit
00d0a1529a
10
index.php
10
index.php
@ -1288,7 +1288,15 @@ echo $css_adicional;
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$('.lazy').Lazy();
|
$('.lazy').Lazy({
|
||||||
|
// your configuration goes here
|
||||||
|
scrollDirection: 'vertical',
|
||||||
|
effect: 'fadeIn',
|
||||||
|
visibleOnly: true,
|
||||||
|
onError: function(element) {
|
||||||
|
console.log('error loading ' + element.data('src'));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
|
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
|
||||||
|
@ -5303,11 +5303,11 @@ while( $row = mysqli_fetch_array( $sql ) ) {
|
|||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
if($row['imagen'] !="") {
|
if($row['imagen'] !="") {
|
||||||
$logo="<img class='img img-responsive img-rounded' style='' alt='$row[razon_social]' src='milfs/images/secure/?file=300/$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]' >";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$logo_empresa = remplacetas('empresa','id',"1",'imagen','');
|
$logo_empresa = remplacetas('empresa','id',"1",'imagen','');
|
||||||
$logo="<img class=' img img-responsive' style='' class=' ' src='milfs/images/sinimagen.jpg' alt='$row[razon_social]'>";
|
$logo="<img class=' lazy img img-responsive' style='' data-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'];
|
||||||
|
Loading…
Reference in New Issue
Block a user