Navigation between divs always loads the whole html page
I would like to create an html page in ZC5 in which I will have 2 buttons and 2 divs.
When I click the first button it will navigate to the 1st div and when I click the 2nd button then to the 2nd div (in the same page).
In the future I will add more buttons and divs.
As a very example
- <a href='#restaurants'><button >Button 1</button></a>
- <a href='#cafes'><button >Button 2</button></a>
- <div id="restaurants">
- <p>Text 1..........</p>
- </div>
- <div id="cafes">
- <p>Text 2.............</p>
- </div>
The problem is when I click a button it navigates for a second to the correct div and then it loads again the whole page.
Why this happens?