I’ve following html structures :
<div id="options">
<input type="radio" id="option0" value="option0" checked='checked' /><label>All</label>
<input type="radio" id="option1" value="option1" /><label>Option 1</label>
<input type="radio" id="option2" value="option2" /><label>Option 2</label>
<input type="radio" id="option3" value="option3" /><label>Option 3</label>
</div>
<p id="sentence1">This is an example of sentence 1</p>
<p id="sentence2">This is an example of sentence 2</p>
<p id="sentence3">This is an example of sentence 3</p>
I want to show all sentences when “All” option checked and show #sentence1 when “Option 1” checked.. and so on.
Any help would be appreciated.
Thanks!
Rifki
Try this :
Jquery :
check this jsfiddle http://jsfiddle.net/7u3uS/3/