This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_width_scrollbar(){ | |
| $('body').append('<div class="get-scrollbar-width-js"></div>'); | |
| var $div = $('.get-scrollbar-width-js'); | |
| $div.css({ | |
| position: 'absolute', | |
| bottom: '0', | |
| left: '0', | |
| zIndex: '-1000', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('body').on('show.bs.modal', '.modal', function(){ | |
| var scrollTop_body = $('html, body').scrollTop() || $(document).scrollTop() || $(window).scrollTop(); | |
| $('body').css({ | |
| top: '-' + scrollTop_body + 'px' | |
| }); | |
| $('body').on('hidden.bs.modal', '.modal', function(){ | |
| $('body').css({ | |
| top: '' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sticky_top($block, $parent, top_padding){ | |
| try{ | |
| var block_H = $block.height(); | |
| var scrollTop_body = $('html, body').scrollTop() || $(document).scrollTop() || $(window).scrollTop(); | |
| if( !$parent ){ | |
| $parent = $block.parent(); | |
| } | |
| var parent_H = $parent.height(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // СВАЙП МЫШКОЙ ГОРИЗОНТАЛЬНОГО СКРОЛЛА ------------------- | |
| var $slider = $('.scroll.scroll_x .scroll__content'); | |
| var isDown = false; | |
| var startX; | |
| var scrollLeft; | |
| $slider.mousedown(function(e){ | |
| isDown = true; | |
| $slider.addClass('active'); | |
| startX = e.pageX - $slider.get(0).offsetLeft; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function init_scrollbar(){ | |
| try { | |
| if( | |
| window.navigator.userAgent.indexOf('Macintosh') != -1 && | |
| window.navigator.userAgent.indexOf('Firefox') != -1 | |
| ){ | |
| $('.scrollbar').css('overflow', 'auto'); | |
| } | |
| else{ | |
| $('.scrollbar').scrollbar({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if($('iframe').length > 0){ | |
| var kk = new Array; | |
| $('iframe').each(function(index) | |
| { | |
| kk[index] = $(this).height() / $(this).width(); | |
| $(this).css('max-width', '100%'); | |
| $(this).css('height', $(this).width() * kk[index]); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getFilename(path) { | |
| return path.split('\\').pop().split('/').pop(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="row align-items-center collapse-inline-js d-none d-md-flex" data-count-rows="1"> | |
| <?php foreach ($data['category']->children as $key => $item): ?> | |
| <div class="col-auto pb-2 pb-lg-3 collapse-el-js"> | |
| <a href="<?=$item->link?>" class="position-relative btn btn-transparent px-2 small-2"> | |
| <img src="<?=SITE?>styles/images/site/str_orange2.png" class="position-absolute"><?=$item->title?> | |
| </a> | |
| </div> | |
| <?php endforeach; ?> | |
| <div class="col-auto pb-2 pb-lg-3 more d-none"> | |
| <a href="#" class="collapse-inline-toggle-js" data-option="showCollapseInline"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('body').find('.collapse-inline-js').each(function(){ | |
| $(this).inlineCollapse(); | |
| }); | |
| var timer_collpase_inline = null; | |
| $(window).resize(function(){ | |
| if( timer_collpase_inline !== null ){ | |
| clearTimeout(timer_collpase_inline); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('video').each(function () { | |
| if ($(this).attr('data-source')) { | |
| var sources = $(this).attr('data-source'); | |
| // console.log(sources); | |
| var ext = sources.split('.')[1]; | |
| var html = '<source src="' + sources + '" type=\'video/' + ext; | |
| if (codecs[ext]) | |
| html += '; codecs="' + codecs[ext] + '"\''; | |
| else |