How can I get the domain name with jquery ??
Similar to the answer before there there is
location.host
The location global has more fun facts about the current url as well. ( protocol, host, port, pathname, search, hash )