I am currently trying to create a markup of a popup modal in HTML/CSS like on this jsfiddle https://jsfiddle.net/ta5zrvxc/
.modalContainer {
width: 350px;
height: 300px;
box-shadow: 0px 28px 28px 9px rgba(0, 0, 0, 0.30);
margin: 0 auto;
box-sizing: border-box;
border-radius: 10px;
text-align: center;
padding: 20px;
font-family: 'Montserrat'
}
button {
margin: 25px 22px 0;
background-color: green;
border: 0;
padding: 13px 30px;
color: white;
font-family: Montserrat;
font-style: normal;
font-weight: bold;
font-size: 17px;
line-height: 21px;
border-radius: 5px;
}
<div class="modalContainer">
<div class="modalContents">
<h1>This is Modal 1</h1>
<button>Go to Next</button>
</div>
</div>
What I would to do is upon clicking the button i want to change the contents of the modal to like this for example. https://jsfiddle.net/k7fht5s6/
.modalContainer {
width: 350px;
height: 300px;
box-shadow: 0px 28px 28px 9px rgba(0, 0, 0, 0.30);
margin: 0 auto;
box-sizing: border-box;
border-radius: 10px;
text-align: center;
padding: 20px;
font-family: 'Montserrat'
}
button {
margin: 25px 22px 0;
background-color: green;
border: 0;
padding: 13px 30px;
color: white;
font-family: Montserrat;
font-style: normal;
font-weight: bold;
font-size: 17px;
line-height: 21px;
border-radius: 5px;
}
<div class="modalContainer">
<div class="modalContents">
<h1>This is Modal 2</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis atque quo cupiditate. `enter code here`</p>
<button>Go to Next</button>
</div>
</div>
What are the ways I can achieve this?