Class jQuery.uri
Represents a URI
Defined in: jquery.uri.js.
Constructor Attributes | Constructor Name and Description |
---|---|
jQuery.uri(relative, base)
Creates a new jQuery.uri object.
|
Field Attributes | Field Name and Description |
---|---|
The authority used in the URI
|
|
The fragment part of the URI
|
|
The path used in the URI
|
|
The query part of the URI
|
|
The scheme used in the URI
|
Method Attributes | Method Name and Description |
---|---|
<static> |
jQuery.uri.absolute()
Creates a jQuery.uri from a known-to-be-absolute URI
|
<static> |
jQuery.uri.base()
Returns the base URI of the page
|
<static> |
jQuery.uri.relative(absolute, base)
Creates a string giving the relative path from a base URI to an absolute URI
|
relative(absolute)
Creates a relative URI giving the path from this URI to the absolute URI passed as a parameter
|
|
resolve(relative)
Resolves a relative URI relative to this URI
|
|
<static> |
jQuery.uri.resolve(relative, base)
Creates a jQuery.uri from a relative URI and an optional base URI
|
toString()
Returns the URI as an absolute string
|
Class Detail
jQuery.uri(relative, base)
Creates a new jQuery.uri object. This should be invoked as a method rather than constructed using new.
uri = jQuery.uri('/my/file.html');
- Parameters:
- {String} relative Optional, Default: ''
- {String|jQuery.uri} base Optional
- Defaults to the base URI of the page
- Returns:
- {jQuery.uri} The new jQuery.uri object.
Field Detail
{String}
authority
The authority used in the URI
{String}
fragment
The fragment part of the URI
{String}
path
The path used in the URI
{String}
query
The query part of the URI
{String}
scheme
The scheme used in the URI
Method Detail
<static>
{jQuery.uri}
jQuery.uri.absolute()
Creates a jQuery.uri from a known-to-be-absolute URI
- Parameters:
- {String}
- Returns:
- {jQuery.uri}
<static>
{jQuery.uri}
jQuery.uri.base()
Returns the base URI of the page
- Returns:
- {jQuery.uri}
<static>
{String}
jQuery.uri.relative(absolute, base)
Creates a string giving the relative path from a base URI to an absolute URI
- Parameters:
- {String} absolute
- {String} base
- Returns:
- {String}
relative(absolute)
Creates a relative URI giving the path from this URI to the absolute URI passed as a parameter
- Parameters:
- {String|jQuery.uri} absolute
- Returns:
- String
resolve(relative)
Resolves a relative URI relative to this URI
- Parameters:
- {String} relative
- Returns:
- jQuery.uri
<static>
{jQuery.uri}
jQuery.uri.resolve(relative, base)
Creates a jQuery.uri from a relative URI and an optional base URI
- Parameters:
- relative
- base
- Returns:
- {jQuery.uri}
- See:
- jQuery.uri
toString()
Returns the URI as an absolute string
- Returns:
- String