Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Navigating to an URL on click not working

edited Apr 8, 2019 12:23PM in Visual Builder 1 comment

Summary

Simple Navigation to different URL is not working in Shell JS

Content

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!