Team:ETH Zurich/Templates/HeaderNew
From 2011.igem.org
(Difference between revisions)
Line 10: | Line 10: | ||
$(function() | $(function() | ||
{ | { | ||
- | |||
var a = document.createElement('a'); | var a = document.createElement('a'); | ||
a.href = document.URL; | a.href = document.URL; | ||
- | + | var docPath = a.pathname + a.search; | |
- | if (docPath.indexOf("?") != -1) | + | if (docPath.indexOf("?") != -1) |
- | { | + | { |
- | + | var docLink = '/' + docPath + '&'; | |
- | } | + | } |
- | else | + | else |
- | { | + | { |
- | + | var docLink = '/' + docPath + '?'; | |
- | } | + | } |
- | + | alert(docLink); | |
if ($('#pt-logout').length) | if ($('#pt-logout').length) |