src/js/libs/spiritual-gui.js
function(element) {
			var result = 0;
			var parent = element.parentNode;
			if (parent) {
				var node = parent.firstElementChild;
				while (node) {
					if (node === element) {
						break;
					} else {
						node = node.nextElementSibling;
						result++;
					}
				}
			}
			return result;
		}
function(element) {
			var result = 0;
			var parent = element.parentNode;
			if (parent) {
				var node = parent.firstElementChild;
				while (node) {
					if (node === element) {
						break;
					} else {
						node = node.nextElementSibling;
						result++;
					}
				}
			}
			return result;
		}
function ( element ) { var result = 0 ; var parent = element . parentNode ; if ( parent ) { var node = parent . firstElementChild ; while ( node ) { if ( node === element ) { break ; } else { node = node . nextElementSibling ; result ++ ; } } } return result ; }
Get ordinal position of element within container.
@param {Element} element
@returns {number}
Get ordinal position of element within container .