Hi there,
I have a jquery slider on my site. The code for this is being stored in a chunk, and to access each new slider, I have 5 anchor links (#slide-one, #slide-two etc...).
On the home page, when a new slide comes into view, a CSS class is added to that link, changing its colour to show that its now active. However, this doesn’t work on the other pages of my site, and I believe this is because modx is automatically adding the page title before the anchor link. For example, whereas the links are like #slide-one on the home page, on the news page, they look like news.html/slide-one, and therefore the active class isn’t working.
This is the only difference between the pages (aside from the main content) as they are using the same main template, so all js files, and css file are the same.
Is there a way to stop modx automatically adding the page-title before these anchor links without messing up the rest of my site?
Thanks
Surely one of you clever souls can provide some sort of response to this?!
I can provide an example if required.
Thanks
Ok, so here’s an example. Basically, the two images show the URL when the cursor is hovering over the first slide link on two separate pages.
The code to produce the slider is exactly the same on both pages (its stored in a chunk) but modx throws in the pagetitle before the anchor link. The first image shows the link on the home page, the second on the news page.
See images attached!
What you call page title it’s actually the url alias. I don’t know if you can remove it because it’s the link to that page.