I need to use an if condition that reads the value of the nid after a ?nid=44 in the address bar. Can it be done with jQuery?
Asked
Active
Viewed 668 times
1
-
Have a look at this question - http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript. There's various methods explained in there that will get you what you want. – ipr101 Sep 12 '11 at 07:09
-
No, jQuery has no support for reading the query string, you would do that using plain Javascript. – Guffa Sep 12 '11 at 07:10
1 Answers
1
Probably jQuery itself can't do this. But exists plugins:
Also it was discussion on the stackoverflow about it: How can I get query string values in JavaScript?