'use strict';
document.addEventListener('DOMContentLoaded', () => {
let checkbox = document.querySelector('label[for="aux_prem"]');
checkbox.addEventListener('click', function()
{
let parent = this.parentNode;
( !parent.classList.contains('selected') ) ?
parent.classList.add('selected'):
parent.classList.remove('selected');
});
});
<?php if(hkb_show_knowledgebase_breadcrumbs()): ?>
<!-- .hkb-breadcrumbs -->
<?php $breadcrumbs_paths = ht_kb_get_ancestors(); ?>
<?php foreach ($breadcrumbs_paths as $index => $paths): ?>
<ol class="hkb-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<?php $last_item_index = count($paths)-1; ?>
<?php foreach ($paths as $key => $component): ?>
<?php if( $component['label'] == 'Помощь' ) continue; ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="<?php echo $component['link']; ?>" title="<?php echo $component['title']; ?>">
<span itemprop="name"><?php echo $component['label']; ?></span>
</a>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php endforeach; ?>
</ol>
<?php endforeach; ?>
<!-- /.hkb-breadcrumbs -->
<?php endif; ?>
$('.curr').text( 1 );
$('.all').text( $('.owl-item').length );
document.addEventListener('DOMContentLoaded', function() {
var Left = document.getElementById('arrowLeft'),
Right = document.getElementById('arrowRight'),
sliderLine = document.getElementById('sliderLine'),
sliderItem = document.getElementsByClassName('sliderItem')[0],
left = 0;
function arrowLeft(){
console.log(sliderItem);
widthSliderItem = sliderItem.offsetWidth;
left = left - widthSliderItem;
if(left >= -2*widthSliderItem){
sliderLine.style.left = left + 'px';
}else{
sliderLine.style.left = 0 + 'px';
left = 0;
}
}
function arrowRight(){
left = left + 950;
if(left <= 0){
sliderLine.style.left = left + 'px';
}else{
left = 0;
}
}
});