joshuaechevarriadop Posted December 10, 2022 Posted December 10, 2022 so im using the code below to create a scroll for some text that. it works well for the first text block but I need to use it for two others that start further down the page and thats where I am having a problem. How do you change the starting position? when I change "top" in the if/else functions of the javascript - it doesnt work. I also changed the top position of the CSS. Not sure what to really do . Also is it possible to have this javascript only work within a section of the page by using the section ID? I have the javascript and the css that is making that block vertical. <script> var windw = this; $.fn.followTo = function(pos) { var $this = this, $window = $(windw); $window.scroll(function(e) { if ($window.scrollTop() > pos) { $this.css({ position: 'absolute', top: pos }); } else { $this.css({ position: 'fixed', top: 0 }); } }); }; $('.sidetwo').followTo(400); </script> <style> p.sidetwo{ top: 600px !important; writing-mode: vertical-lr !important; text-orientation: upright !important; letter-spacing:25px; color:white; font-size:35px; font-family:lato; } </style> 1086982907_ScreenRecording2022-12-10at8_59_13AM.mov
creedon Posted December 10, 2022 Posted December 10, 2022 Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
joshuaechevarriadop Posted December 12, 2022 Author Posted December 12, 2022 On 12/10/2022 at 5:21 PM, creedon said: Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. https://blueberry-carrot-xawg.squarespace.com/selected PW codeblock
creedon Posted December 12, 2022 Posted December 12, 2022 Quote so im using the code below to create a scroll for some text that. I'm unable to find the page you show in your video. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment