Raster.findParentWithClass( element, className )
Given an element, this method search up the DOM herachy for a parent having the given class name.Parameters
Name | Type | Description | |
---|---|---|---|
element | object | A DOM element. | |
className | string | Name of the style class to be found in this element. |
Returns
Type | Description |
---|---|
object |
is no parent with the given class name was found.
If the given element has the given class name itself, returns
the element passed in argument. |