jquery url 

how to get all parts of url in jquery

Property    Result
------------------------------------------
host        www.google.com:80
hostname    www.google.com
port        80
protocol    http:
pathname    index.php
href        http://www.google.com:80/index.php#notes
hash        #tab1
search      ?foo=12345

var x = $(location).attr('');

To get parts of the url or to use in jquery to change the urls without refreshing the page.