scrollspy problem with two navs
Created by: devniel
Hi, it seems that scrollspy goes crazy with two navs targeting same elements, I have this approach because of responsive design, one navigation menu is hidden in certain dimensions.
Demo : http://jsbin.com/xowuw/1/
By now, my workaround is a simple filter in scrollspy.js' refresh method :
var exists = false;
for(var i in self.targets){
console.log(self.targets[i], " == ", this[1]);
if(self.targets[i] == this[1]){
exists = true;
break;
}
}
if(!exists){
self.offsets.push(this[0])
self.targets.push(this[1])
}
Thanks !