includes/clientside/static/functions.js
changeset 1272 05b7645f12e6
parent 1252 e34c23a35dc9
child 1311 a228f7e8fb15
--- a/includes/clientside/static/functions.js	Thu Jul 29 19:30:11 2010 -0400
+++ b/includes/clientside/static/functions.js	Fri Jul 30 12:02:18 2010 -0400
@@ -546,6 +546,30 @@
 	return position;
 }
 
+function getXScrollOffset(el)
+{
+	var position;
+	var s = el || self;
+	el = el || document;
+	if ( el.scrollTop )
+	{
+		position = el.scrollLeft;
+	}
+	else if (s.pageYOffset)
+	{
+		position = self.pageXOffset;
+	}
+	else if (document.documentElement && document.documentElement.scrollLeft)
+	{
+		position = document.documentElement.scrollLeft;
+	}
+	else if (document.body)
+	{
+		position = document.body.scrollLeft;
+	}
+	return position;
+}
+
 function setScrollOffset(offset)
 {
 	window.scroll(0, offset);