A very simple snippet, which stores the root URL in a variable:
[javascript]
// Retrieve root URL
var root = location.protocol + ‘//’ + location.host;
[/javascript]
A very simple snippet, which stores the root URL in a variable:
[javascript]
// Retrieve root URL
var root = location.protocol + ‘//’ + location.host;
[/javascript]
© 2023 Best jQuery.