Plugin Author
malihu
(@malihu)
Hi,
The way to this is via javascript. Does your theme allow you to add js scripts?
To provide an actual working code I’d have to see your page/site.
Hi, thanks for your reply. Yes, my theme does use JS. Here is my basic code:
<section id="about">content here</section>
<section id="music">content here</section>
<section id="video">content here</section>
<section id="contact">content here</section>
<div id="fixednav">
<a class="prev" rel="m_PageScroll2id" href=""></a>
<a class="dot about-highlight" rel="m_PageScroll2id" href="#about"></a>
<a class="dot music-highlight" rel="m_PageScroll2id" href="#music"></a>
<a class="dot video-highlight" rel="m_PageScroll2id" href="#video"></a>
<a class="dot contact-highlight" rel="m_PageScroll2id" href="#contact"></a>
<a class="next" rel="m_PageScroll2id" href=""></a>
</div>
Plugin Author
malihu
(@malihu)
Can you post your page/site link? I’d have to see the exact markup in order to provide exact code.
Here is the link, thank you. It’s the fixed dot nav on the right.
Plugin Author
malihu
(@malihu)
OK add the following script in your page:
(function($){
$(window).on("load",function(){
$("#scrollnav .next, #scrollnav .prev").on("click",function(e){
e.preventDefault();
var curr=$("#scrollnav .mPS2id-highlight"),
next=curr.next("._mPS2id-h"),
prev=curr.prev("._mPS2id-h");
if($(this).hasClass("next")){
if(next.length) next.trigger("click");
}else{
if(prev.length) prev.trigger("click");
}
});
});
})(jQuery);
That should do the trick. Test it and let me know.
Worked a treat. Thank you so much.