Englisch Version | Deutsche Version
Welcome, Guest
Username: Password: Remember me

TOPIC: how to use class "ico" button as a scroll link

how to use class "ico" button as a scroll link 4 years 6 months ago #1

  • equitime
  • equitime's Avatar
  • Offline
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
<div style="text-align: center;"><a class="scroll" href="index.php?option=com_content&amp;view=article&amp;id=12&amp;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
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #2

  • joomlaplates
  • joomlaplates's Avatar
  • Offline
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?
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #3

  • equitime
  • equitime's Avatar
  • Offline
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.
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #4

  • joomlaplates
  • joomlaplates's Avatar
  • Offline
Hi again,
you need the "scroll" class to scroll where you want.
And if the scroll class is enabled you always have a "hashtag"
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #5

  • equitime
  • equitime's Avatar
  • Offline
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 :
<a class="scroll" href="index.php?option=com_content&amp;view=article&amp;id=12&amp;Itemid=167#top-c"><span class="ico">p</span></a>
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 :
<a href="index.php?option=com_content&amp;view=article&amp;id=12&amp;Itemid=167#top-c"><span class="ico">p</span></a>
Then it opens the right page but there is no scroll animation and the "hashtag" appears in the url
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #6

  • joomlaplates
  • joomlaplates's Avatar
  • Offline
Yes youre right.
The scroll function is available only for active and published sections
The administrator has disabled public write access.

how to use class "ico" button as a scroll link 4 years 6 months ago #7

  • equitime
  • equitime's Avatar
  • Offline
Maybe the smooth-scroll is not a solution, I just need to specify not to scroll to top while charging the new article in the main-inner position because when the page is charging again, it always go back to the top so that we don't see the article. I have the navbar, then an image on top-a, a presentation text on top-b and the customed menu on top-c so that the main-inner is not visible, we have to scroll down to see it but I'd like visitors not to have to scroll down each time they click on a link in my customed menu. Is it possible ?
The administrator has disabled public write access.
Moderators: joomlaplates

Einzelnes Theme ( Download 1 Template)

Das sog. "Einzelne Theme" ist für alle Kunden geeignet die lediglich ein (1) Template benötigen, egal ob kommerziell oder privat genutzt. Sie dürfen das erworbene Template auf einer Joomla Installation produktiv nutzen.


Mitgliedschaft ( Download alle Templates)

Während ihrer Mitgliedschaft ist es ihnen erlaubt alle Templates herunter zu laden und unseren Bestimmungen entsprechend zu nutzen. Nach Ablauf der Mitgliedschaft dürfen sie natürlich alle bereits in Nutzung befindlichen Templates weiter einsetzen. Sie haben jedoch nach Ende ihrer Mitgliedschaft keinen Zugriff mehr auf den Download Bereich und keinen Zugriff mehr auf Updates.

Die Zahlung ist einmalig und ihr Membership läuft automatisch aus, sofern sie es nicht erneuern.

Unsere Mitgliedschaften bieten wir ausschließlich über JoomlaPlates.com an.

Jetzt kaufen