window.location works fine, but returns me the full, absolute path, e.g. http://domain.xyz/punch/lines . But I only need http://domain.xyz/ . How can I extract only this first part? And how can I make this dynamic, I want to be always the same, even when the path of the subdirectory increases?
jquery url href path location
leymannx Aug 01 '13 at 11:17 2013-08-01 11:17
source share