Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

How to link with a hash in URL?

$
0
0
I am trying to create a simple link as seen in the code below.
Code:
<li class="nav-item">
    <a class="nav-link" id="nav-item" href="<?=site_url('Home#About');?>"> About</a>
</li>
What I want to happen is when the user clicks the link, it will take them to the section of the page it's linked to.  When I click this, nothing happens.  I have tried configuring the routes.php file to allow the link to work, but nothing happened. 

Manually typing in the URL works fine.  

What kind of workaround would you recommend for this?  Thank you in advanced!

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>