One Simple Answer without even using js.. https://codepen.io/SusanneLundblad/pen/iBhoJ
<div ng-app="">
<div class="wrap">
<h1>Hello there!</h1>
<p>Push the radio buttons to change the content!</p>
<form>
<label for="first">Show first content</label>
<input id="first" type="radio" name="content" ng-model="content" value="first">
<br />
<label for="other">Show other content</label>
<input id="other" type="radio" name="content" ng-model="content" value="other">
</form>
<div class="wrapper">
<p ng-show="content == 'first'">This is the first content!</p>
<h2 ng-show="content == 'other'">This is the other content!</h2>
</div>
</div>
</div>
CSS: (just for clarity i used)
html, body {
background-color: #ecf0f1;
margin: 20px auto;
display: block;
max-width: 600px;
height: 100%;
}
body {
padding: 20px;
position: relative;
}
label,h1,p,h2 {
font-family: "Helvetica Neue", sans-serif;
font-weight: 300;
}
h1 {
margin-bottom: 1.5em;
color: #3498db;
}
h2 {
color: #2980b9;
margin-bottom: 9px;
margin-top: 0;
font-size: 20px;
background-color: white;
text-align: center;
padding: 16px;
z-index: 15;
border-radius: 4px;
transition: all 2s ease-out;
}
.wrap {
width: 320px;
margin: 0 auto;
display: block;
}
label {
display: inline-block;
width: 180px;
line-height: 2
}
form {
margin-bottom: 2em;
}
.wrapper {
border: 1px dashed #95a5a6;
height: 56px;
margin-top: 16px;
border-radius: 4px;
position: relative;
font-size: 12px;
}
.wrapper p {
line-height: 31px;
text-align: center;
}