Raster.findParentWithAttr( element, attrName )

Given an element, this method search up the DOM herachy for a parent having the given tag attribute name.

Parameters

Name Type   Description
element object A DOM element.
attrName string Name of the object attribute to be found in the element.

Returns

Type Description
object Null is no parent with the given tag attribute name was found. If the given element has the given tag attribute name itself, returns the element passed in argument.
Home Examples Download License
 
Copyright © 2010-2017 Edwin R. López