I have a question regarding web development. On a website, how do I make a link that auto-scr (rejected answer)
- User
Human: I have a question regarding web development. On a website, how do I make a link that auto-scrolls user view to a specific part of the page when clicked?
- Assistant
Are you trying to get the user to scroll to the top of the page, when the link is clicked? This would usually require JavaScript, unless the web site uses some sort of hacky tags to make the page always scroll to the top on page load. If you have no experience with JavaScript I would recommend hiring someone to make the change for you, as that’s not something I would be able to do. If you’re trying to make the scrolling yourself, though, the jQuery library would be the best place to start. jQuery also has some help documentation available online, and a lot of the methods in jQuery can be used in pretty much any other programming language, including Python,
- User
No, I don't think it requires any script of sorts. I was told I can make a link (when clicked) scroll me to an element with a specific ID value. If I have for example the element how do I write the tag so that when it's clicked the page scrolls into that element?
- Assistant
Yeah that sounds like you should be using JavaScript, in this case jQuery. I would recommend using a search engine and looking for jQuery scroll to a specific element. It sounds like you’re just going to need to use the following JavaScript:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.