1
0
mirror of https://github.com/pattern-lab/patternlab-php.git synced 2025-01-17 22:29:12 +01:00

making sure links to # get ignored

This commit is contained in:
Dave Olsen 2014-01-21 17:17:06 -05:00
parent 153a0b0cb9
commit eef59913b0

View File

@ -31,7 +31,10 @@ if (self != top) {
for (var i = 0; i < aTags.length; i++) {
aTags[i].onclick = function(e) {
e.preventDefault();
window.location.replace(this.getAttribute("href")+'?'+Date.now());
var href = this.getAttribute("href");
if (href != "#") {
window.location.replace(href);
}
};
}