Tagged: x
-
AuthorPosts
-
March 14, 2017 at 4:51 pm #1407165
I am looking to add a “page contents” section at the beginning of a couple of my longer pages that have a fair bit of info on them. I am planning on using this type of code in the contents list:
Your Link Text
and the target that I want it to jump to:
Target TextWould that work in itself?
If so I would like the transition from clicking the content element to the place on the page where it is to be a smooth swift scroll to the content. I would rather do this without adding plugins and I found this site that gives info on how that might be possible …
https://css-tricks.com/snippets/jquery/smooth-scrolling/Would this kind of thing be possible in X? If so I would appreciate it if you could let me know what code is needed where so I can make that happen. Thanks for all your wonderful support 😉
March 14, 2017 at 5:37 pm #1407199oops….seems the code got changed.
The page contents section at the top of the site will be something like:
https://www.example.com/#example
and the target will have a code like this:
<a name="example"></a></p>
I have started to set this up on my site but I still need the smooth scroll effect if possible. I have also noticed that the jump takes the page down so that the heading linked to is at the very top of the page but unfortunately my header is covering the H2 heading so it is invisible unless you scroll up a bit. Is there a way to offset the jump so the H2 headline is visible or so the site header is not counted as part of the page?
March 14, 2017 at 5:38 pm #1407202This reply has been marked as private.March 15, 2017 at 1:17 am #1407614Hi there,
You don’t need to follow that article.
Add following HTML in text or raw content element.<a href="#contact">contact us</a>|<a href="#x-section-1">section 1</a>
Hope it helps.
March 15, 2017 at 4:37 am #1407760I’m sorry but I am not that advanced with this kind of stuff so I don’t understand what the code means. Could you break it down a bit for me please?
Also, it seems that you are addressing the page jump issue I asked about but have ignored the smooth scrolling part which is the main focus of what I am asking about. Telling me that I don’t need that article doesn’t really help me understand how to find the solution to my query.
Is the smooth scrolling feature already in X which is why I don’t need that article?
Some extra detail would really help. ThanksMarch 15, 2017 at 4:39 am #1407765And you have ignored my question about the fact that when the page does jump it places the header that is the focus of the jump underneath the site header so the H2 title is obscured. Is there a way to offset the jump or to make the header of the site be taken into account?
March 15, 2017 at 10:52 am #1408179Hey Richard,
Smooth scroll is included in Cornerstone out of the box. You just need to set the href of your link to the ID of your text.
Thanks.
March 16, 2017 at 9:08 am #1409605Thanks for clearing that up. All sorted now
March 16, 2017 at 10:33 am #1409742Glad to hear it!
Feel free to ask us if you have any further queries regarding the X-theme.
Thank you. 🙂
-
AuthorPosts