title: How to get the base path in jQuery?
body: <p><code>window.location</code>works fine, but returns me the whole, absolute path, like <code>http://domain.xyz/punch/lines</code>. But I only need <code>http://domain.xyz/</code>. How can I extract only that first part? And how can I make that dynamic, I mean to be always the same even when the subdirectory path gets longer?</p>