Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

URL Parser


Average rating
(3 votes)

Parses URLs and provides easy access to information within them, such as the protocol, host, port, the segments that make up the path and the various query string values. The parser is based on the Regex URI parser by Stephen Levithian - http://blog.stevenlevithan.com/archives/parseuri.

// Get the domain name (host) from the current page URL
jQuery.url.attr("host");

// Get the query string value for 'item' for the current page
jQuery.url.param("item");

// Get the second segment of the URL of the current page
jQuery.url.segment(2);

// Get the protocol of a manually passed in URL
jQuery.url.setUrl("http://allmarkedup.com/").attr("protocol") // returns 'http'

Releases

Official releasesDateSizeLinksStatus
1.0.12008-Aug-297.97 KBRecommended for 1.0.xThis is currently the recommended release for 1.0.x.