Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.mydomain.com/some/subdir/file.php
- $.post('/some/subdir/file.php', ...);
- /**
- * Retrieves the current root URL.
- *
- * @return string the root URL
- */
- $.fn.rootUrl = function() {
- var url = location.href;
- return url.substring(0, url.indexOf('/', 7));
- };
Add Comment
Please, Sign In to add comment