[jQuery] How to get parts of URL after domain
I"m sure this is easy to do, but I can't figure it out for some
reason. I'm writing a simple little function in Drupal (in script.js
in my theme) to display a different banner image (as a background for
an element) based on the URL. So, for instance, if the URL is
http://www.mysite.com/services, I want to display one image, if it's
http://www.mysite.com/about-us, I want to display another one, and so
on. Is there a built in way to get everything after "http://
www.mysite.com/" in jQuery, or do I just need to use window.location
and do something like use a regular expression to get what I need?
Thanks.
Steve