Answer the question
In order to leave comments, you need to log in
Swup.js - how to work with it in general?
document.addEventListener("DOMContentLoaded", function restart() {
$('.main_page-center_block-portfolio a, .squad_people a').click(function(){
$('.article_full_screen').addClass("article_full_screen-view");
$('.article_full_screen-right_block').addClass("article_full_screen-right_block-view");
$('.article_full_screen-left_block').addClass("article_full_screen-left_block-view");
$('body').addClass("body-overflow");
var href = $(this).attr('href');
console.log(href);
var toLoad = href +'index.php #article';
$('#article').load(toLoad);
history.pushState(null, null, href);
return false;
});
swup.on('contentReplaced', restart);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question