title: How can inner elements can be removed when cliking the button
body: <p>In my html, i have list of divs inside one div and those each div has checkbox[input type=checkbox].</p>
  
  <p>my aim is when i check the checkbox and when i select the remove button, then, parent div(parent of input:checkbox)  has to be removed, I tried, but, i could not. Any help?</p>
  
  <pre><code>$("#delbtn").click(function(e) {
      var divLen=$("#checkbox-content div");
  
      for(var k=0;k&lt;divLen.length;k++)
      {
          if(divLen[k].children("input").attr("checked")){
              divLen[k].remove();
          }
      }
      return false;
  });
  </code></pre>
  
  <p>Html</p>
  
  <pre><code>&lt;div id="checkbox-content"&gt;
      &lt;div&gt;&lt;input type="checkbox" name="checkedvalue"/&gt;Some text&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" name="checkedvalue"/&gt;Some text&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" name="checkedvalue"/&gt;Some text&lt;/div&gt;
  &lt;/div&gt;
  &lt;button id="delbtn"&gt;Remove&lt;/button&gt;
  </code></pre>