Questions tagged [removechild]

removes and returns a child node from the DOM

Description

Removes and returns a child node from the DOM.

The removed child node still exists in memory, but is no longer part of the DOM. It can still be re-used, via the oldChild object reference.

Syntax

var oldChild = element.removeChild(child);
element.removeChild(child);

where,

child is the child node to be removed from the DOM.

element is the parent node of child.

oldChild holds a reference to the removed child node. oldChild === child.

References

672 questions
-1
votes
1 answer

What is the purpose of jQuery's cleanData function?

While studying the jQuery sourcecode I stumbled upon the cleanData-function several times: jQuery.remove() calls it. So do other functions. What is the purpose of calling cleanData before removing the DOM-Element? Is jQuery's remove()-method…
Thomas Junk
  • 5,588
  • 2
  • 30
  • 43
-1
votes
2 answers

PHP remove Item in array and reset key

I have a big array (multidimensional) and I need to remove items in it and reset the index for it. I have no idea how to do it. Example: $array = array( 0 => 'Name G', 1 => 'Name Z', 2 => 'Name A', 3 => 'Name H', 4 => 'Name U', ) I need…
Pat R Ellery
  • 1,696
  • 3
  • 22
  • 40
-2
votes
2 answers

Can't use removeChild() to delete the element just appended to list. Can only delete the ones at the beginning

This is two button. One is "appendChild" ,One is "Remove Child". List ----Before------------ one two three appended appended ------------------------- After appended two new elements, I want to remove the last one. But when I press the remove…
-2
votes
1 answer

how to remove some elements of table cells using JQuery

have such a part of a markup: data1 data2 data3 there are inputs which append dynamically into 3 cells with a class like…
Vladyslav Plakhuta
  • 1,379
  • 2
  • 10
  • 15
-2
votes
2 answers

JQuery remove element from parent

I have a "Try Again!" message that appears when the inserted value exists in my dropdown select list, this is my code: //I am trying to remove this message once the user starts typing again: $('#new_day').on('input', function(){ //Get…
Chayma Atallah
  • 725
  • 2
  • 13
  • 30
-2
votes
2 answers

PHP remove useless nested array

I'm using jQuery plugin which generates following array: array:4 [ 0 => array:1 [ "page_id" => "1" ] 1 => array:2 [ "page_id" => "2" "children" => array:1 [ 0 => array:2 [ 0 => array:2 [ "page_id" =>…
general666
  • 1,001
  • 2
  • 16
  • 31
-2
votes
1 answer

Null pointer exception on list view

I am creating dynamic views. I want to add views to list and remove them onActivityResult. But i am getting NullPointerException on list view when I am adding view to the list. Where should I add view in list view? Here is my code : public class…
-2
votes
2 answers

Remove Child created by class as3

I've been learning AS3 for a class project for just over a few months, most of what I know is by looking at how others problems were solved on here. To the point. I've got a class called Generate so I import that to my main timeline, in that class…
-2
votes
1 answer

Removing next Element - Javascript

The button is on this TR and i can easily remove it with the following code. How do i remove the NEXT TR E.g. --> Code works with removing this --> Remove the next TR THis one var $this = $(this), orderTr =…
CodeGuru
  • 3,645
  • 14
  • 55
  • 99
-2
votes
1 answer

Please explain how this javaScript code removes all nodes

HTML
  • Item 1
  • Item 2
  • Item 3
  • Item 4
I can't seem to understand how this while statement deletes all the nodes in the above list. Can someone please…
Samuel
  • 5,529
  • 5
  • 25
  • 39
1 2 3
44
45