Skip to content

Instantly share code, notes, and snippets.

Rostislav extra0

  • Ukraine, Donetsk
Block or report user

Report or block extra0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View script.js
// toggle class with block
$('[data-toggle]').on('click', function(){
$(this).toggleClass('active');
$(''+ $(this).attr('data-toggle') +'').toggleClass('active');
});
@extra0
extra0 / script.js
Created Mar 7, 2017
Клик вне области
View script.js
// закрываем языковую панель по клику вне области
$(document).mouseup(function(e) {
if (langList.has(e.target).length === 0 && currentLang.has(e.target).length === 0) {
langList.slideUp('500');
currentLang.removeClass('open');
langList.removeClass('active');
}
});
@extra0
extra0 / script.js
Created Feb 15, 2017
Моб. устройство
View script.js
// определяем мобильный ли браузер
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
@extra0
extra0 / script.js
Last active Mar 6, 2017
Active toggle
View script.js
// toggle class active
$('[data-toggle]').on('click', function(){
$(this).toggleClass('active');
$(''+ $(this).attr('data-toggle')+'').toggleClass('active');
});
@extra0
extra0 / _header.scss
Last active Mar 6, 2017
Моб. кнопка меню
View _header.scss
&-btn {
position: relative;
background: none;
border: none;
width: 36px;
height: 23px;
padding: 0;
@include transition(all 0.2s ease-in-out);
* {
display: block;
You can’t perform that action at this time.