views:

51

answers:

2

Hi,

I have javascript to set equal column heights of two divs contained by a parent div. Somebody even coded an working example that works (mine doesn't). What I have found is that it IS setting the height of the container which contains the two divs I intended to set. Why is my script setting the container height rather than it's children? Please see my previous question at:

http://stackoverflow.com/questions/1458233/dont-understand-jquery-setting-equal-height-contained-divs

What does the following line actually do? I don't understand the "> div" part.

setEqualHeight($(".instructionsParent > div"));

A: 
parent > child

"Matches all child elements specified by "child" of elements specified by "parent"."

http://docs.jquery.com/Selectors/child#parentchild

Scott Evernden
James
A: 

The selector ".instructionsParent > div" means "select all the div elements that are children under the element with the class instructionsParent". So the div elements are the elements selected here.

Lance Fisher
Thank you for the explanation.
James