I am new to stackoverflow and have a question regarding the following js code:
function reveal(direction) {
var callbackTime = 750,
callbackFn = function() {
if (direction === 'left') {
setTimeout(function() {
$("#about").addClass("active");
setTimeout(function() {
$("#about").removeClass('in');
setTimeout(function() {
scrollbar('.about_content');
}, 1000);
}, 1200);
}, 1000);
} else if (direction === 'right') {
setTimeout(function() {
$("#contact").addClass("active");
setTimeout(function() {
$("#contact").removeClass('in');
setTimeout(function() {
scrollbar('.contact_content');
}, 1000);
}, 1200);
}, 1000);
}
On the website, the internal links are working with animations and the href does not become part of the url.
Until now, there were only two links on the page (left side and right side) but now I want to have several links on the left side, which is why I would like to change the if condition from "direction" to the href of the clicked link. Is there any way I can do that?
Thank you very much in advance!
Aucun commentaire:
Enregistrer un commentaire