diff --git a/docs/api/methods.html b/docs/api/methods.html index ab9a9f37..a6810e8b 100755 --- a/docs/api/methods.html +++ b/docs/api/methods.html @@ -21,7 +21,7 @@
jQuery Mobile exposes several methods and properties on the $.mobile object for use in your applications.
+jQuery Mobile exposes several methods and properties on the $.mobile object for use in your applications.
$.mobile.path.makePathAbsolute (method)relPath (string, required) A relative file or directory path.absPath (string, required) An absolute file or relative path to resolve against.
+
+// Returns: /a/b/c/file.html
+var absPath = $.mobile.path.makePathAbsolute("file.html", "/a/b/c/bar.html");
+
+// Returns: /a/foo/file.html
+var absPath = $.mobile.path.makePathAbsolute("../../foo/file.html", "/a/b/c/bar.html");
+
+
+
+ $.mobile.path.makeUrlAbsolute (method)relUrl (string, required) A relative URL.absUrl (string, required) An absolute URL to resolve against.
+
+// Returns: http://foo.com/a/b/c/file.html
+var absUrl = $.mobile.path.makeUrlAbsolute("file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: http://foo.com/a/foo/file.html
+var absUrl = $.mobile.path.makeUrlAbsolute("../../foo/file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: http://foo.com/bar/file.html
+var absUrl = $.mobile.path.makeUrlAbsolute("//foo.com/bar/file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: http://foo.com/a/b/c/test.html?a=1&b=2
+var absUrl = $.mobile.path.makeUrlAbsolute("?a=1&b=2", "http://foo.com/a/b/c/test.html");
+
+// Returns: http://foo.com/a/b/c/test.html#bar
+var absUrl = $.mobile.path.makeUrlAbsolute("#bar", "http://foo.com/a/b/c/test.html");
+
+
+
+
+ $.mobile.path.isSameDomain (method)url1 (string, required) A relative URL.url2 (string, required) An absolute URL to resolve against.
+
+// Returns: true
+var same = $.mobile.path.isSameDomain("http://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: false
+var same = $.mobile.path.isSameDomain("file://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: false
+var same = $.mobile.path.isSameDomain("https://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
+
+// Returns: false
+var same = $.mobile.path.isSameDomain("http://foo.com/a/file.html", "http://bar.com/a/b/c/test.html");
+
+
+
+
+ $.mobile.path.isRelativeUrl (method)url (string, required) A relative or absolute URL.
+
+// Returns: false
+var isRel = $.mobile.path.isRelativeUrl("http://foo.com/a/file.html");
+
+// Returns: true
+var isRel = $.mobile.path.isRelativeUrl("//foo.com/a/file.html");
+
+// Returns: true
+var isRel = $.mobile.path.isRelativeUrl("/a/file.html");
+
+// Returns: true
+var isRel = $.mobile.path.isRelativeUrl("file.html");
+
+// Returns: true
+var isRel = $.mobile.path.isRelativeUrl("?a=1&b=2");
+
+// Returns: true
+var isRel = $.mobile.path.isRelativeUrl("#foo");
+
+
+
+
+
+ $.mobile.path.isAbsoluteUrl (method)url (string, required) A relative or absolute URL.
+
+// Returns: true
+var isAbs = $.mobile.path.isAbsoluteUrl("http://foo.com/a/file.html");
+
+// Returns: false
+var isAbs = $.mobile.path.isAbsoluteUrl("//foo.com/a/file.html");
+
+// Returns: false
+var isAbs = $.mobile.path.isAbsoluteUrl("/a/file.html");
+
+// Returns: false
+var isAbs = $.mobile.path.isAbsoluteUrl("file.html");
+
+// Returns: false
+var isAbs = $.mobile.path.isAbsoluteUrl("?a=1&b=2");
+
+// Returns: false
+var isAbs = $.mobile.path.isAbsoluteUrl("#foo");
+
+
+
+
+
+ $.mobile.base (methods, properties)