How do remove a div by clicking on it, but hide or display any of the divs with name or age in the ID.
One checkbox should toggle any divs with “name” at the beginning of the ID, and another checkbox should toggle any divs with “age”at the beginning of the ID
<div id="container">
<div id="name-254"></div>
<div id="age-645"></div>
<div id="name-142"></div>
<div id="name-341"></div>
<div id="age-341"></div>
<div id="name-341"></div>
</div>
In order to make the
divelements self-destruct when you click on them you could do the following:As for checkboxes that toggle the visibility of each set:
See it in action here: http://jsfiddle.net/6GBpW/3/