Sharepoint Page reloaded when I click the button

I used following accordion code, But my page reload or refresh when i click it.

<h2>IT Teams</h2>
Click on the buttons to open the collapsible content.

<button class=”accordion”>USA</button>
<div class=”panel”>
Jose Andrew

Edward Gee
</div>
&nbsp;

 

============================ Solution ==========================

Add type=”button” to your <button> tag to stop the reload:</button>

<button class=”accordion” type=”button”></button>

extradrmtech

Since 20 years I work on Database Architecture and data migration protocols. I am also a consultant in Web content management solutions. I am an experienced web-developer with over 10 years developing PHP/MySQL, C#, VB.Net applications ranging from simple web sites to extensive web-based business applications. When not writing code, I like to dance salsa and swing and have fun with my little family.

You may also like...