This file contains 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
btn.addEventListener('click', () => { | |
btn.classList.toggle('opened'); | |
slideToggle(popupBlock, 300, function() { | |
console.log('callback ended animation'); | |
}); | |
}) | |
function slideToggle(container, speed = 300, callback) { | |
let currentState; | |
if (window.getComputedStyle(container).display == "none") { |
This file contains 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="box"> | |
<div class="test"></div> | |
<div class="test-2"></div> | |
</div> | |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> | |
<defs> | |
<filter id="goo"> | |
<feGaussianBlur in="SourceGraphic" stdDeviation="3" result="blur" /> | |
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="goo" /> |
This file contains 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
<? | |
$subdomain = "XXX"; | |
$client_id = "XXX"; // id нашей интеграции | |
$client_secret = "XXX"; // секретный ключ нашей интеграции | |
$redirect_uri = "https://XXX.ru/"; // домен сайта нашей интеграции | |
$amoTokenFile = $_SERVER['DOCUMENT_ROOT'] . "/ajax/amotoken.txt"; // Путь для файла с токенами - любой удобный | |
$responsible_user_id = 9380670; | |
$resultAmoIntegration = []; |
This file contains 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
/* Anim Observer BEGIN */ | |
document.addEventListener("DOMContentLoaded", function(event) { | |
const elements = document.querySelectorAll('.anim'); | |
const options = { | |
rootMargin: '0px 0px', | |
threshold: 1 | |
} | |
const callback = (entries) => { | |
entries.forEach(entry => { | |
if (entry.isIntersecting) { |
This file contains 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
const videos = document.querySelectorAll("video"); | |
const config = { | |
rootMargin: '0px -100px', | |
threshold: 0 | |
} | |
const callback = (entries) => { | |
entries.forEach((entry) => { | |
if (!entry.isIntersecting) { | |
entry.target.pause(); | |
console.log('Exit video'); |
This file contains 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
// Получаем следующий и предыдущий элемент | |
$query = CIBlockElement::GetList( | |
array('SORT' => 'ASC'), | |
array('IBLOCK_ID' => $arResult['IBLOCK_ID'],'ACTIVE' => 'Y'), | |
false, | |
array('nPageSize' => 1, 'nElementID' => $arResult['ID']), | |
array('ID', 'DETAIL_PAGE_URL','DETAIL_PICTURE','NAME') | |
); | |
while ($elem = $query->GetNextElement()) { | |
$arElements[] = $elem->GetFields(); |
This file contains 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($){ | |
const duration = 5; | |
const interval = 10; | |
const stepsBars = $('.intro-step'); | |
let isPaused = false; | |
let percentTime, step, tick, scaleWidth; | |
let currentIndex = 0; | |
let introSlider = $('.intro-slider').flickity({ | |
cellAlign: 'left', |
This file contains 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
<!-- CWCBfK05 - ID нужного места--> | |
<a href="https://yandex.by/map-widget/v1/-/CWCBfK05" class="fancy-map"> | |
ссылка | |
</a> |
This file contains 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 initMap(){ | |
let myMap = new ymaps.Map("map", { | |
center: [55.76, 37.64], | |
zoom: 7 | |
}); | |
} | |
$(function($){ | |
function addScript(src) { | |
let s = document.createElement('script'); |
This file contains 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
<? | |
$dbItems = \Bitrix\Iblock\ElementTable::getList(array( | |
'select' => array('ID', 'NAME', 'IBLOCK_ID'), | |
'filter' => array('IBLOCK_ID' => $arParams['IBLOCK_ID']) | |
)); | |
while ($arItem = $dbItems->fetch()){ | |
$dbProperty = \CIBlockElement::getProperty( | |
$arItem['IBLOCK_ID'], | |
$arItem['ID'] | |
); |
NewerOlder