Get URL Query String with jQuery

To get query string value in an url, for example to get ‘user_id’ value from an url

http://getquerystringparams.com?user_id=123456&msg_id=56