In an oriented tree, the parent is the previous node before the node of interest. The word parent can then be used in countless abstractions of computer science. The container of contained graphic or logic items can be called a parent. The inherited class in OOP can be called the parent.
Questions tagged [parent]
2764 questions
337
votes
14 answers
How may I reference the script tag that loaded the currently-executing script?
How can I reference the script element that loaded the javascript that is currently running?
Here's the situation. I have a "master" script being loaded high in the page, first thing under the HEAD tag.
geuis
270
votes
6 answers
How to find a parent with a known class in jQuery?
I have a
that has many other
s within it, each at a different nesting level. Rather than give every child
an identifier, I rather just give the root
the identifier. Here’s an example:
…
![](../../users/profiles/636065.webp)
John Smith
- 8,096
- 11
- 44
- 66
215
votes
4 answers
super() fails with error: TypeError "argument 1 must be type, not classobj" when parent does not inherit from object
I get some error that I can't figure out. Any clue what is wrong with my sample code?
class B:
def meth(self, arg):
print arg
class C(B):
def meth(self, arg):
super(C, self).meth(arg)
print C().meth(1)
I got the sample…
![](../../users/profiles/200743.webp)
Ehsan Foroughi
- 2,800
- 2
- 16
- 19
184
votes
15 answers
How can I return to a parent activity correctly?
I have 2 activities (A and B) in my android application and I use an intent to get from activity A to activity B. The use of parent_activity is enabled:
![](../../users/profiles/906050.webp)
ashiaka
- 3,762
- 8
- 28
- 43
179
votes
9 answers
How to call a parent method from child class in javascript?
I've spent the last couple of hours trying to find a solution to my problem but it seems to be hopeless.
Basically I need to know how to call a parent method from a child class.
All the stuff that I've tried so far ends up in either not working or…
![](../../users/profiles/1151658.webp)
YemSalat
- 15,862
- 12
- 39
- 50
173
votes
9 answers
Changing the child element's CSS when the parent is hovered
First of all, I'm assuming this is too complex for CSS3, but if there's a solution in there somewhere, I'd love to go with that instead.
The HTML is pretty straightforward.
Text Block 1
…
![](../../users/profiles/625840.webp)
Hartley Brody
- 7,043
- 12
- 33
- 46
152
votes
13 answers
How do I get the n-th level parent of an element in jQuery?
When I want to get, for example, the 3rd level parent of the element I must write $('#element').parent().parent().parent() Is there a more optimal method for this?
![](../../users/profiles/750459.webp)
Artur Keyan
- 7,403
- 12
- 49
- 64
127
votes
8 answers
Make div (height) occupy parent remaining height
http://jsfiddle.net/S8g4E/
I have a container div with two children. The first child has a given height. How can I make the second child to occupy the "free space" of the container div without giving a specific height?
In the example, the pink div…
![](../../users/profiles/1176359.webp)
Alvaro
- 7,575
- 8
- 42
- 70
126
votes
7 answers
Select parent element of known element in Selenium
I have a certain element that I can select with Selenium 1.
Unfortunately I need to click the parent element to get the desired behaviour. The element I can easily locate has attribute unselectable, making it dead for clicking. How do I navigate…
![](../../users/profiles/1108119.webp)
f l
- 1,374
- 2
- 8
- 9
93
votes
5 answers
89
votes
6 answers
How to get parent process in .NET in managed way
I was looking a lot for method to get parent process in .NET, but found only P/Invoke way.
![](../../users/profiles/41956.webp)
abatishchev
- 92,232
- 78
- 284
- 421
75
votes
7 answers
How to delete parent element using jQuery
I have some list item tags in my jsp. Each list item has some elements inside, including a link ("a" tag) called delete. All that I want is to delete the entire list item when I click the link.
Here is the structure of my…
![](../../users/profiles/685273.webp)
Noob
- 1,017
- 2
- 14
- 16
70
votes
2 answers
jQuery: get parent tr for selected radio button
I have the following HTML:
....
… |