K2 have in its k2.js file, this call:
// Smooth Scroll
new SmoothScroll({
duration: 500
});
since there isn't passed a "links" parameter in there, all anchor links on the entire page gets attached to a SmoothScroll click event.
From the MooTools SmoothScroll source:
link.addEvent('click', function(event){
this.anchor = anchor;
this.toElement(anchor);
event.stop();
}.bindWithEvent(this));
as you can see, the events that are attached, are rendered inoperable, because of event.stop().
This is easily prevented by namespacing the links you want to scroll, with for example an "k2" or "k2-scroll" class.
for example:
// Smooth Scroll
new SmoothScroll({
duration: 500,
links: 'a.k2' //an alternate could be '.k2 a' to keep it cleaner
});
// Smooth Scroll
new SmoothScroll({
duration: 500
});
since there isn't passed a "links" parameter in there, all anchor links on the entire page gets attached to a SmoothScroll click event.
From the MooTools SmoothScroll source:
link.addEvent('click', function(event){
this.anchor = anchor;
this.toElement(anchor);
event.stop();
}.bindWithEvent(this));
as you can see, the events that are attached, are rendered inoperable, because of event.stop().
This is easily prevented by namespacing the links you want to scroll, with for example an "k2" or "k2-scroll" class.
for example:
// Smooth Scroll
new SmoothScroll({
duration: 500,
links: 'a.k2' //an alternate could be '.k2 a' to keep it cleaner
});