jquery remove html tags code example

Example 1: how to remove html element in jquery

$("button").click(function(){
  $("p").remove();
});

Example 2: jquery remove element

$( ".class" ).remove();
$( "#id" ).remove();
$( "div" ).remove();

Example 3: 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();
  });