Menu icon Foundation

My Posts


My Comments

Jason Froderman commented on Jason Froderman's post over 3 years

I've resorted to the following outside of Magellan. Just wondering if I'm going to run into any weird cross browser stuff trying to have multiple things solving smooth scrolling at once.
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
console.log(this);
if (location.pathname.replace(/\//,'') == this.pathname.replace(/\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
 
 

Jason Froderman commented on Mario Giancini's post over 3 years

@Rafi, is this something that is still the case for Foundation 6? I didn't find a list of available easing options.
More than willing to help add something doc wise. Would like to figure out the best way to switch out easing and could document that to if you could point me in the right direction.

Posts Followed

No Content

Following

    No Content

Followers

My Posts

My Comments

You commented on Jason Froderman's post over 3 years

I've resorted to the following outside of Magellan. Just wondering if I'm going to run into any weird cross browser stuff trying to have multiple things solving smooth scrolling at once.
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
console.log(this);
if (location.pathname.replace(/\//,'') == this.pathname.replace(/\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
 
 

You commented on Mario Giancini's post over 3 years

@Rafi, is this something that is still the case for Foundation 6? I didn't find a list of available easing options.
More than willing to help add something doc wise. Would like to figure out the best way to switch out easing and could document that to if you could point me in the right direction.

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content