diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index 44b92a0c..5594fe11 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -91,16 +91,12 @@ var href = $(this).attr('data-url'); $('.navbar-collapse').removeClass('in'); $('.navbar-collapse').addClass('collapsing'); - var url = window.location.pathname; - var urlSplit = url.split('/'); - if (urlSplit.length === 3 && urlSplit[2] === 'datacenterlight') { + if ($(href).length) { $('html, body').animate({ scrollTop: $(href).offset().top }, 1000); } else { - var allUrl = window.location.href; - var redirect = allUrl.split('whydatacenterlight') - window.location.href = '/en-us/datacenterlight' + href; + window.location.href = '/datacenterlight' + href; } }); } diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 84358b4d..b32fe10d 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -33,7 +33,7 @@