1

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?

ronymattar
  • 149
  • 3
  • 14
  • 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 Answers1

1

Probably jQuery itself can't do this. But exists plugins:

PARSEQUERY

QUERY STRING OBJECT

Also it was discussion on the stackoverflow about it: How can I get query string values in JavaScript?

Community
  • 1
  • 1
Samich
  • 29,157
  • 6
  • 68
  • 77