Use pathname instead of href

Was adding #hash to ajax calls