rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * Finds element(s) within the given context that have the data role attribute equal to the given role.
 *
 * @param role data attribute role value to find
 * @param $context (optional) content to find elements, if empty the entire document will be used
 * @returns {*} found elements, if any
 */
Finds element(s) within the given context that have the data role attribute equal to the given role.

@param role data attribute role value to find
@param $context (optional) content to find elements, if empty the entire document will be used
@returns {*} found elements, if any
Finds element ( s ) within the given context that have the data role attribute equal to the given role . @param role data attribute role value to find @param $context ( optional ) content to find elements if empty the entire document will be used @returns { * } found elements if any
function findByDataRole(role, $context) {
    $context = $context || jQuery(document);
    return $context.find("[" + kradVariables.ATTRIBUTES.DATA_ROLE + "='" + role + "']");
}
function findByDataRole ( role , $context ) { $context = $context || jQuery ( document ) ; return $context . find ( "[" + kradVariables . ATTRIBUTES . DATA_ROLE + "='" + role + "']" ) ; }
Finds element(s) within the given context that have the data role attribute equal to the given role.
Finds element ( s ) within the given context that have the data role attribute equal to the given role .