Possible Duplicate:
How can I get query string values?
I have the following URL:
http://www.mysite.co.uk/?location=mylocation1
What I need is to get the value of location
from the URL into a variable and then use it in a jQuery code:
var thequerystring = "getthequerystringhere"
$('html,body').animate({scrollTop: $("div#" + thequerystring).offset().top}, 500);
Does anyone know how to grab that value using JavaScript or jQuery?