many ways: if you donβt have an identifier for the child, you can remove the children of my parent position:
var p ='.parrent';//identify the parrent $('p').children('1').remove();//remove the child placed in ('1');
delete Directly [if you have an identifier]
$('.parent .child').remove();
if you donβt know what a parent is.
var selector = '.child';
In case you have too many children with the same class, but the parent version is for everyone. you can also remove Child by placing a child class
//[._iNote] is the selector for the removing Element Here. $(select).parent().children("._iNote").remove();
This script removes only the selected child in the selected parity. if there are many children with the same identifier, then all of them will be deleted so [???] in this case you can create a custome attr to select the item [HTML5 only]. Example
<p data-me="someThing-i-like"> [its a custom attr (data-me="someThing-i-like")] </p>
in this case, to remove this item
$("[data-me=someThing-i-like]").remove();
if you have any quistion about this post plz plz plz let me know [comment]
insCode
source share