I am trying to completely remove the div, I filled it with PHP loading and the foreach loop, its print programs from the database, this is what the source code looks like when the page first loads
<div class="frame" id="program_list">
<div class="box">
<div class="box-holder">
<div class="box-frame">
<h3>Marathon</h3> <p>Run 26 miles around the city.</p> <p>Trainer: John Doe</p>
<span class="btn-program"><a href="#" tabindex="10"><em>BID PROGRAM</em></a></span>
</div>
</div>
</div>
<div class="box">
<div class="box-holder">
<div class="box-frame">
<h3>Jumping Jacks</h3>
<p>Do 400 Jumping Jacks in 15 minutes</p>
<p>Trainer: Jane Doe</p>
<span class="btn-program"><a href="#" tabindex="10"><em>BID PROGRAM</em></a></span>
</div>
</div>
</div>
And I'm trying to clear the div_file_list using an empty jquery function as follows:
function clear_programs_div()
{
alert("Test");
$("program_list").empty();
}
But it does not seem to get rid of the div. Does this function only remove inner text, not elements? Why doesn't he delete any elements inside? Any tips will help you!
source
share