Using the following code, when a menu item is clicked it loads the content from an external html file. When I click through each menu item, the content from each external html file stays on the page. How can I make it so that as I click through, only the content from the clicked menu item is displayed?
<script type="text/javascript">
$(function(){
$("#accordion1").click(function(evt){
$("#course1").load("course1.html")
evt.preventDefault();
})
$("#accordion2").click(function(evt){
$("#course2").load("course2.html")
evt.preventDefault();
})
$("#accordion3").click(function(evt){
$("#course3").load("course3.html")
evt.preventDefault();
})
})
</script>
<div id="content">
<div id="course1">
</div>
<div id="course2">
</div>
<div id="course3">
</div>
</div>