for (let i = 1; i <= 10; i++) {
$(`.year-${i}`).click(() => fullpage_api.moveTo(i + 1));
}
<button class="btn-filter" data-filter="foo1">.foo1</button>
<button class="btn-filter" data-filter="foo2">.foo2</button>
<button class="btn-filter" data-filter="foo3">.foo3</button>
<button class="btn-filter" data-filter="all">All</button>
$('.btn-filter').on('click', function (e) {
var $el = $(e.target);
var className = $el.data('filter');
if (className) { filter(className) }
});
<input id="lower" type="number" value="100">
<input id="upper" type="number" value="200">
const lower = document.querySelector('#lower');
const upper = document.querySelector('#upper');
lower.addEventListener('input', function() {
this.value = Math.min(this.value, upper.value);
});
upper.addEventListener('input', function() {
this.value = Math.max(this.value, lower.value);
});