Say I have a URL for an article:
http://domain.com/blog/articles/title-here/
And it has about 5 pages, so as you go through each page, you get:
http://domain.com/blog/articles/title-here/ OR http://domain.com/blog/articles/title-here/1
http://domain.com/blog/articles/title-here/2
http://domain.com/blog/articles/title-here/3
http://domain.com/blog/articles/title-here/4
http://domain.com/blog/articles/title-here/5
I know that the following code will get the full current URL (aka including the page #):
var u = window.location.href;
But is there a way to limit it so that the page # is NOT a part of the variable “u”?
Perhaps there’s a regex or something I should add in there..? (I’m fairly new to javascript, so not sure how to apply this?)
Would that work for you?
Edit
I changed it… again 😛