let checked = null;
$('input').click(function() {
checked = checked === this.value ? null : this.value;
this.checked = !!checked;
});
const $checkboxes = $('input').change(function() {
if (this.checked) {
$checkboxes.not(this).prop('checked', false);
}
});
надо открыть этот файл в редакторе и внести
server_names_hash_bucket_size
. Надо комментарий (сомвол #) убрать, если он есть.Как открыть этот файл в редакторе?
vi /etc/nginx/nginx.conf
- vi это редактор.В терминале появляется куча строк и надпись
ESC
затем :
затем q!
и Enter
$('.filter').change(({ target: t }) => {
$(`[name="${$(t).closest('.button').data('size')}"]`)
.closest('.product-box')
.toggleClass('hidden', !t.checked);
}).find(':checked').change();
$('.section').on('click', '.control-label', function() {
$(this)
.closest('.box')
.toggleClass('opened')
.siblings()
.removeClass('opened');
});
.box .list {
display: none;
}
.box.opened .list {
display: block;
}
<div id="id">
<input type="checkbox">checkbox 1
<input type="checkbox">checkbox 2
<input type="checkbox">checkbox 3
</div>
<script>
$('#id input:checkbox').click(function(){
if ($(this).is(':checked')) {
$('#id input:checkbox').not(this).prop('checked', false);
}
});
</script>
$('.close').on('click', function (e) {
e.stopPropagation(); // вот так
$('.section').removeClass('opened');
});
[data-option-value$="из дуба"] {
background: yellow;
}
$('[data-option-value$="из дуба"]').css('outline', 'dashed 2px red');
this.previousImage = this.previousImage.bind(this);
this.nextImage = this.nextImage.bind(this);
this.prevBtn = this.slider.siblings(".slider-btn.previous");
this.nextBtn = this.slider.siblings(".slider-btn.next");