Fetching value from label in jquery

Fetching value from label in jquery

Hi,
 
I am using aspx, js file.
 
I have a hidden div in which I have a label. The value of the label is added dynamically using aspx.cs code, and which is getting added. However I am not able to fetch the value in js file.
I have used the below code:
 
  1. // aspx
  2. <script type="text/javascript" src="/Scripts/testSearch.js">
  3. </script>
  4. <script type="text\javascript">
  5.  var lblCatId = "<%=lblCategory.ClientID%>";
  6.  </script>
  7. <div id="HiddenDiv" style="display: none;">
  8. <asp:Label ID="lblCategory" runat="server" Text=""></asp:Label>
  9.  </div>
  10. // js file
  11. var selCategory = this.document.getElementById(lblCatId);
 
I am getting the error as "lblCatId" is undefined.
How to fetch the value ?
 
Thanks