DefinitelyTyped

Index

Variables

Dynamic modules

Interfaces

Functions

Variables

$: JQueryStatic

jQuery: JQueryStatic

Functions

purl(): Url

Parse the current page URL

Returns

Url

purl(someUrl: string): Url

Pass in a URI as a string and parse that

Parameters

  • someUrl: string

    the url to be parsed

Returns

Url

Url: Url

public attr(option: string): string

The .attr() method is used to return information on various parts of the URL.

Parameters

  • option: string

Returns

string

public fparam(parameterName: string): string

Gets a parameter from the fragment segment

Parameters

  • parameterName: string

Returns

string

public fsegment(position: number): string

Gets the fragment segment at the especified position.

Parameters

  • position: number

Returns

string

public param(parameterName: string): string

The .param() method is used to return the values of querystring parameters.

Parameters

  • parameterName: string

Returns

string

public segment(position: number): string

The .segment() method is used to return values of individual segments from the URL's path. Pass in an integer value to get the value of that segment - note however that the count is not zero-indexed like an array - i.e. .segment(1) returns the first segment, not the second one. You can also pass in negative values, in which case it will count back from the end of the path rather than forwards from the start.

Parameters

  • position: number

Returns

string