End of Support for Joomla 3 - Forum closed
how to use class "ico" button as a scroll link
how to use class "ico" button as a scroll link was created by equitime
Posted 8 years 2 months ago #15039
Hi,
I'm trying to create a smooth scroll menu for a multiple pages website.
I've created a main menu nav which only displays the first level menu links
Then I've created customed modules for each second level menu links (on top-c position)
So the nav bar shows "home" "page2" "page3" ... and when I click on "page2" menu link the second level menu appears on top-c with "link1" "link2" "link3"...
exemple of one of the second level menu link in a mod-custom module on top-c position
But this doesn't show the new article, it only scrolls to the top-c position. (I've chosen the scroll to top-c position to always have the "mod-custom modules menu" visible)
If I don't specify the class "scroll" then the link works properly but there is no scroll animation and the url of the page shows the hashtag such as www.domain.com/page2/link1.html#top-c but I don't want to see this hashtag.
Have you any idea to help me ?
Thanks a lot
I'm trying to create a smooth scroll menu for a multiple pages website.
I've created a main menu nav which only displays the first level menu links
Then I've created customed modules for each second level menu links (on top-c position)
So the nav bar shows "home" "page2" "page3" ... and when I click on "page2" menu link the second level menu appears on top-c with "link1" "link2" "link3"...
exemple of one of the second level menu link in a mod-custom module on top-c position
Code:
<div style="text-align: center;"><a class="scroll" href="index.php?option=com_content&view=article&id=12&Itemid=167#top-c"><span class="ico">p</span></a>
<h4>menu title</h4>
</div>
But this doesn't show the new article, it only scrolls to the top-c position. (I've chosen the scroll to top-c position to always have the "mod-custom modules menu" visible)
If I don't specify the class "scroll" then the link works properly but there is no scroll animation and the url of the page shows the hashtag such as www.domain.com/page2/link1.html#top-c but I don't want to see this hashtag.
Have you any idea to help me ?
Thanks a lot
by equitime
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic how to use class "ico" button as a scroll link
Posted 8 years 2 months ago #15048
1.) Which theme
2.) Live Url please
3.) Next time please use the right forum category
PS: Scrolling Url without "hashtag" is not possible!! How should it works?
2.) Live Url please
3.) Next time please use the right forum category
PS: Scrolling Url without "hashtag" is not possible!! How should it works?
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
Last Edit:8 years 2 months ago
by joomlaplates
Last edit: 8 years 2 months ago by joomlaplates.
Please Log in or Create an account to join the conversation.
Replied by equitime on topic how to use class "ico" button as a scroll link
Posted 8 years 2 months ago #15058
Hi,
Sorry, I've posted this question after a search in the whole forum and I forgot to choose a forum before...
1.) JP-Xtra theme
2.) there is no live url for the moment, only a local website on my computer
I've tested the smooth-scroll function of JP-XTRA template and it does not let appear the "hashtag" in the url this is why I thought I could have the same result while using it for my menu. When I let the class="scroll" in the <href>, the "hashtag" is not in the url but the link does not work, it only scrolls toward the section top-c of the present page.
Sorry, I've posted this question after a search in the whole forum and I forgot to choose a forum before...
1.) JP-Xtra theme
2.) there is no live url for the moment, only a local website on my computer
I've tested the smooth-scroll function of JP-XTRA template and it does not let appear the "hashtag" in the url this is why I thought I could have the same result while using it for my menu. When I let the class="scroll" in the <href>, the "hashtag" is not in the url but the link does not work, it only scrolls toward the section top-c of the present page.
Last Edit:8 years 2 months ago
by equitime
Last edit: 8 years 2 months ago by equitime.
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic how to use class "ico" button as a scroll link
Posted 8 years 2 months ago #15060
Hi again,
you need the "scroll" class to scroll where you want.
And if the scroll class is enabled you always have a "hashtag"
you need the "scroll" class to scroll where you want.
And if the scroll class is enabled you always have a "hashtag"
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
by joomlaplates
Please Log in or Create an account to join the conversation.
Replied by equitime on topic how to use class "ico" button as a scroll link
Posted 8 years 2 months ago #15061
I don't have it when I enable the scroll class but I can't scroll to a section in another page, I only can scroll to a section in the active page that's the main problem.
If my link is :
On click, it scroll to top-c position but in the active page, it does not open the article (id=12) before and there is no "hashtag" in the url because the url hasn't changed. It works like a scroll top button
If my link is :
Then it opens the right page but there is no scroll animation and the "hashtag" appears in the url
If my link is :
Code:
<a class="scroll" href="index.php?option=com_content&view=article&id=12&Itemid=167#top-c"><span class="ico">p</span></a>
If my link is :
Code:
<a href="index.php?option=com_content&view=article&id=12&Itemid=167#top-c"><span class="ico">p</span></a>
Last Edit:8 years 2 months ago
by equitime
Last edit: 8 years 2 months ago by equitime.
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic how to use class "ico" button as a scroll link
Posted 8 years 2 months ago #15064
Yes youre right.
The scroll function is available only for active and published sections
The scroll function is available only for active and published sections
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
by joomlaplates
Please Log in or Create an account to join the conversation.
Moderators: joomlaplates