Navigating to an URL on click not working
Summary
Simple Navigation to different URL is not working in Shell JSContent
My requirement is to navigate to the different URL on click of a link. It's not working in Shell JS. When I write the code like below.
$(document).on("click", ".localeLink", function(e) {
var localeCode = e.target.id;
if (localeCode == "en-US") {
console.log("Navigate to google";
var url = "http://google.com";
$(location).attr('href', url);
}
});
Navigate to google log is getting printed in the console. but the current page is not getting navigate to google.com.
Tagged:
0