Creating menu to link div

Asked

Viewed 97 times

0

I have a link:

<li><a href="#schedule">Programação</a></li>

Which redirects to the div:

<div class="schedule" id="schedule">
    <h1>Programação</h1>
</div>

In firefox and edge works perfectly, when I look at the link in the browser status bar it looks like this:

meusite.com/#schedule

But in Chrome does not work the link, the status bar, the '/' does not appear and is like this:

meusite.com#schedule

What I can do to make Chrome work?

This site I did some 3 years ago and the client never reported me the error, now he came to me to request the correction. Was it a Chrome update? I’ve tried it on several Chrome browsers on several devices and the problem persists.

  • I tested it on Chrome and it worked perfectly. The above code is correct. It may be that something else or script is interfering in the functioning of it. Look in the Chrome console to see if there is no script error.

  • Rafael, you can create an example in jsFiddle that doesn’t work for you?

  • Sergio, I created in jsFiddler, the link is https://jsfiddle.net/0unyvtk3/#&togetherjs=lNznulMvl3, as it is the first time I use it not if I did it right, but it’s there.. Thank you for your attention

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.