function findParentPage(element) {
		do {
			var parent = element.parentNode;
			if (parent && parent.getAttribute('data-role') === 'page') {
				return parent;
			}
		} while(parent);
		return null;
	}
/**
	 * Searches up the tree for a JQM page.
	 * @param {Element} element
	 * @returns {Element} found page or null if no parent page could be found.
	 */
Searches up the tree for a JQM page.
@param {Element} element
@returns {Element} found page or null if no parent page could be found.
Searches up the tree for a JQM page . @param { Element } element @returns { Element } found page or null if no parent page could be found .
function findParentPage(element) {
		do {
			var parent = element.parentNode;
			if (parent && parent.getAttribute('data-role') === 'page') {
				return parent;
			}
		} while(parent);
		return null;
	}
function findParentPage ( element ) { do { var parent = element . parentNode ; if ( parent && parent . getAttribute ( 'data-role' ) === 'page' ) { return parent ; } } while ( parent ) ; return null ; }
Searches up the tree for a JQM page.
Searches up the tree for a JQM page .