$this->response->redirect($seo);
$this->response->redirect($seo,301);
<header>
<p>Хедер</p>
</header>
<main>
<p>Пример контента</p>
<a id="page_up_down_button" href="#">Наверх</a>
</main>
<footer>
<p>Футер</p>
</footer>
#page_up_down_button {
position: sticky;
bottom: 0;
}
<script type="text/javascript">
var scroll_position = null;
$('#page_up_down_button').click(function(){
if ($(document).scrollTop() > 0) {
scroll_position = $(document).scrollTop();
$('#page_up_down_button').html('Обратно');
return true;
} else if (scroll_position > $(document).scrollTop()) {
$(document).scrollTop(scroll_position);
$('#page_up_down_button').html('Наверх');
return false;
};
});
function check_status_button(){
if ($(document).scrollTop() > 0) {
scroll_position = null;
$('#page_up_down_button').html('Наверх');
};
};
$(window).resize(function() {
check_status_button();
});
$(window).scroll(function() {
check_status_button();
});
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
const form = document.querySelector('form');
form.addEventListener('change', onChange);
form.dispatchEvent(new Event('change'));
function onChange() {
this.querySelector('.result').textContent =
Array.prototype.reduce.call(
this.querySelectorAll(':checked'),
(acc, n) => acc + +n.getAttribute('rel'),
0
);
}
function onChange({ currentTarget: ct }) {
let sum = 0;
for (const n of ct.elements) {
sum += n.attributes.rel.value * n.checked;
}
ct.querySelector('.result').innerText = sum;
}
<srcset="image-small.png 320w, image-medium.png 800w, image-large.png 1200w">
class ShapeOverlays {
toggle() {
this.isAnimating = true;
for (var i = 0; i < this.numPoints; i++) {
this.delayPointsArray[i] = 0;
}
if (this.isOpened === false) {
this.open();
} else {
this.close();
}
}
open() {
this.isOpened = true;
this.elm.classList.add('is-opened');
this.timeStart = Date.now();
this.renderLoop();
}
close() {
this.isOpened = false;
this.elm.classList.remove('is-opened');
this.timeStart = Date.now();
this.renderLoop();
}
}
(function() {
const elmHamburger = document.querySelector('.hamburger');
const gNavItems = document.querySelectorAll('.global-menu__item');
const elmOverlay = document.querySelector('.shape-overlays');
const overlay = new ShapeOverlays(elmOverlay);
elmHamburger.addEventListener('click', () => {
if (overlay.isAnimating) {
return false;
}
overlay.toggle();
if (overlay.isOpened === true) {
elmHamburger.classList.add('is-opened-navi');
for (var i = 0; i < gNavItems.length; i++) {
gNavItems[i].classList.add('is-opened');
}
} else {
elmHamburger.classList.remove('is-opened-navi');
for (var i = 0; i < gNavItems.length; i++) {
gNavItems[i].classList.remove('is-opened');
}
}
});
// Add code below
gNavItems.forEach((item, index) => (
item.addEventListener('click', () => {
overlay.close();
})
));
}());