AJZ Posted January 6 Share Posted January 6 Hi, I'm looking to reroute the URL link for a site title (7.1 Fluid engine). Here's the current code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script>$(document).ready(function () { $("#site-title").attr("href", "https://www.dream.industries/garden"); }); </script> It works great. One problem, it doesn't work on mobile. Not sure why. Can anyone help? Thank you in advance if so. Link to comment
yubrajs Posted January 6 Share Posted January 6 It can be done with simple javascript: Add this line in Code Injection > Footer <script> window.onload = function () { document.querySelectorAll("#site-title").forEach((el) => { el.setAttribute("href", "https://www.dream.industries/garden"); }); }; </script> AJZ 1 Link to comment
AJZ Posted January 7 Author Share Posted January 7 Thank you for the reply, I appreciate the help. Regrettably, this doesn't fix the issue. When I use this code instead of the first one, the url doesn't reroute at all. Link to comment
yubrajs Posted January 7 Share Posted January 7 Please share the url. The code should work. Here is the example: https://soybean-kangaroo-2dxw.squarespace.com/ password: 12345 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment