Return to Snippet

Revision: 52631
at October 28, 2011 02:25 by Alexintosh


Initial Code
function get_root(obj, current_ref) {
	if(obj.parent.location.href != current_ref) {
		return get_root(obj.parent, obj.location.href);
	}
	else {
		return obj;
	}
}

Usage: get_root(window, window.location.href).location.href

Initial URL
www.tecnocrazia.com

Initial Description


Initial Title
Ifram get parent

Initial Tags


Initial Language
JavaScript