In an oriented tree, the parents are the previous nodes before the node of interest. Parent, grandparent, great grandparent etc...
Questions tagged [parents]
73 questions
19
votes
2 answers
Get first matching ancestor containing a specific class
I am trying to iterate to the first ancestor containing the class ‘sys-form-row’.
I am able to get the row containing class="sys-form-row" using the following: objBack =
$('#txtMyBox2').parent().parent();
This seems incredibly clumsy. What I…

user831839
- 247
- 3
- 6
17
votes
2 answers
Can you change a widget's parent in python tkinter?
Is there any way to change a widget's (ttk.frame in this case) parent? I can't find any keywords to use in the widgets .config. Is this not possible in python tkinter? What I'd like functionally is to take my current frame in my tkk.notebook widget,…

Ponml
- 2,917
- 5
- 20
- 17
14
votes
7 answers
Getting Parent Layout in Qt
quick question. Is there any way to (easily) retrieve the parent layout of a widget in Qt?
PS: QObject::parent() won't work, for logical reasons.
EDIT:
I'm positive the widget has a parent layout, because I added it to a layout earlier in the code.…

Austin
- 791
- 1
- 7
- 14
11
votes
3 answers
How to reach the uncle using jquery

Ali Bassam
- 9,691
- 23
- 67
- 117
9
votes
1 answer
Three.js setFromRotationMatrix strange behavior when rotation is over 90 degrees
I have objects which each have a separate parent for each rotation axis (1 for X-rotation, 1 for Y-rotation, and 1 for Z-rotation. They are all related to each other in that order as well: X-rotation object is a child of the Y-rotation object.…

MrGarretto
- 282
- 4
- 14
4
votes
2 answers
How to create an SQL Server 2005 CTE to return parent-child records, for children with multiple parents
I'm experimenting with CTE's in SQL Server but have reached a dead end with getting the following scenario to work. I have a hierarchy table similar to this:
Node(ID:439)
Node(ID:123)
Node(ID:900)
Node(ID:56)
…
Jason Evans
3
votes
6 answers
How to get the parent element value using jquery?
I have a table with a couple of rows with two cells in each row and each cell has couple of info like office name, address and phone number etc. Using jquery for each, the address is being pulled out from each cell and fed into google map geocoder…

AJSwift
- 709
- 4
- 12
- 26
3
votes
6 answers
Jquery First occurrence tree traversal up parents/siblings
What is the best way to get closest (up tree) given a class, but it can be a sibling of a parent.
I want to get "errors1" element start with element ".start"
...
errors2
.....

Luccas
- 4,078
- 6
- 42
- 72
3
votes
4 answers
jquery remove nodes and keep children
I am very ashamed to post this question but I have not managed to get use of unwrap or replaceWith methods in Jquery for that need.
My problem is simple : I need to remove some nodes (jquery selectors) of an html code without losing the children of…

ikodev
- 49
- 8
3
votes
1 answer
Adding "this" to the parents stack for "each" in jQuery
This question is a bit of a two-parter. First, the title question. Here's what I've got:
// Report all of the parents
$(this).parents().each(function(i){
// Collect the parts in a var
var $crumb = '';
// Get the tag name of the parent
…

Matrym
- 16,643
- 33
- 95
- 140
2
votes
2 answers
parents and appendto don't work together?
jquery.parents and jquery.appendTo seem don't work together, for instance, I want to add a new element to the clicked button's parent's element only,
$('.local').click(function(){
var object = $(this);
var parent =…

Run
- 54,938
- 169
- 450
- 748
2
votes
1 answer
jQuery: Keep .index( ) to return every parents index
In the code below, I am trying to get back the index of the element clicked and if so, its parent index. The problem is that it tries to return, also, its parent's index...
By example: if I click on "1" the alert will give back 0,0 which is good.
If…

Sebastien Filion
- 79
- 9
2
votes
4 answers
.parents().removeClass() not working
i got this javascript, trying to remove a class on a parent element:
$(this).parents(".box").removeClass("expanded");
on this html:

kevin
- 618
- 8
- 24
2
votes
4 answers
jQuery getting text content of a span
I am trying to write a delete function in Dropzone.js. In order to do that I need the id of the file the way it was uploaded.
I tried to get a property of an object with no success. Now I am trying to use jQuery to get the value or text content of…
user1967599
2
votes
2 answers
Get All Parents Info Up Until Specified Parent
I have this html codes example:
…
Clicked

Ari
- 4,643
- 5
- 36
- 52