Loading details on the index page

Loading details on the index page

I'm developing an app in which I load all the pages in the index.html using jQuery. On the loaded pages, there is one particular page which comes along with links which when clicked takes you to another page to give you details about the link you clicked. Now I want to be able to load the details of the clicked link into a particular div in the index.html called news_details. How do I do that?

This is the code I'm using for the links:

  1. <a href="index.html#news_details?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "news_id=" & rs_news.Fields.Item("news_id").Value %>"><%=(rs_news.Fields.Item("headline").Value)%>

and here the jQuery loading the page with the url into the div:


  1.  <script language="javascript">
    $(function () {
      var url = window.location.search.substring(1);
      $('#news_details').load('news.asp'+ url);

      $(document).on("click",".classOfNewLink",function(e) {
        e.preventDefault();
        $("#news_details").load(this.href);
      });

    });
    </script>