<?php $maxQuantity = 5;
foreach ( $main_table as $index->$table_item ):
if($index<$maxQuantity) { ?>
<div class="main-table__item">
<div class="main-table__img">
<a href="<?php echo $table_item['crb_image']; ?>">
<img src="<?php echo $table_item['crb_image']; ?>" alt="">
</a>
</div>
<div class="main-table__title">
<h3 class="main-table__title"><?php echo $table_item[ 'title' . get_lang() ]; ?></h3>
<p><?php echo $table_item[ 'text' . get_lang() ]; ?></p>
</div>
</div>
<?php }
endforeach; ?>
@font-face {
font-family: 'opensans';
src: url("https://fonts.gstatic.com/s/opensans/v17/mem5YaGs126MiZpBA-UN7rgOVuhpOqc.woff2") format('woff2');
}
@font-face {
font-family: 'roboto';
src: url("https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxK.woff2") format('woff2');
}
<footer>
<ul>
<li><a>About</a></li>
<li><a>Contact</a></li>
<li><a>News</a></li>
<li><a>Home</a></li>
</ul>
</footer>
footer{
position: fixed;
bottom: 0;
width: 100%;
}
const windowHeight = $(window).height(),
$this = $(".sdelaliCount");
let countFlag = false;
$(document).on('scroll', function() {
$this.each(function() {
var tcount = $this.data("count");
height = $this.offset().top + $this.height();
if ($(document).scrollTop() + windowHeight >= height && !countFlag) {
countFlag = true;
$this.animateNumber({ number: tcount, easing: 'easeInQuad'}, 1000),function() {
countFlag = false;
};
}
});
});