delete div in div from class code example
Example 1: remove element by class
function removeElementsByClass(className){
var elements = document.getElementsByClassName(className);
while(elements.length > 0){
elements[0].parentNode.removeChild(elements[0]);
}
}
Example 2: delete div based on select
$('#record_nav ul li').on('click', function(e){
$('#record_nav ul li.selected').removeClass('selected');
$(this).addClass('selected');
$('.content').hide();
var id = $(this).data('target');
$(id).show();
});