Skip to content

Instantly share code, notes, and snippets.

View chichikinaleksei's full-sized avatar

Aleksei chichikinaleksei

View GitHub Profile
$('.faq__question-header').on('click', function() {
let value = $(this).data('header');
let panel = $(this).next().prop('scrollHeight');
// Remove all styles
$('.faq__question-body').css({
'maxHeight': '0px',
'padding' : '0 20px'
});
.radio__wrapper
.radio
input(type="radio" name="choose" value="Да").radio__input
i.radio__real
p.radio__text Да
.radio
input(type="radio" name="choose" value="Нет").radio__input
i.radio__real
p.radio__text Нет
@chichikinaleksei
chichikinaleksei / select.js
Created May 28, 2019 09:30
Custom select option
// CUSTOM SELECT
$(".custom-select").each(function() {
var classes = $(this).attr("class"),
id = $(this).attr("id"),
name = $(this).attr("name");
var template = '<div class="' + classes + '">';
template += '<span class="custom-select-trigger">' + $(this).attr("placeholder") + '</span>';
template += '<div class="custom-options">';
$(this).find("option").each(function() {
template += '<span class="custom-option ' + $(this).attr("class") + '" data-value="' + $(this).attr("value") + '">' + $(this).html() + '</span>';