Struck with a simple issue of hidden field like this:
<input id="hid" type="hidden" name="hid" runat="server"/>
trying to retrieve like this
var rid = $("#hid").val();
alert(rid);
But still am getting undefined value in the alert. Browser used : chrome
Its working for me. Here is the JSFiddle. http://jsfiddle.net/P5r9N/
HTML
jQuery