Hi,

I'm working on a project in JS / ASP.NET... And I have a page with a navigation table with a scrollbar height.
I wish keep the position of the scrollbar when I click on another page and then back on the table.
I created a JS script via jquery to store the variable position in a cookie :

Code:
<script type="text/javascript">  
  if(typeof($.cookie(cookieSelectedReference)) != 'undefined'){
    var scrollBox = $('#scrollable-outer');
    var selectedRow = scrollBox.find('#ref-'+$.cookie(cookieSelectedReference));
    if(selectedRow.length){
      selectedRow.trigger('click');
    }
  }    
</script>
I keep my variable position of the scrollbar and the link to the page in my cookie on the click event.
By I can't recover my position scrollbar when I return to my table.

Code:
<div id="regulation-mapping-wrap">
 
    <div id="scrollable-outer">
        <table class="sticky-header">
            <thead>
                <tr class="head-row">
                    <th class="col-1"></th>
                    <th class="col-2 sortable" title="@Html.Resource("REGMAPPING_SORT_BY_TYPE")" data-sort="string"><a href="#">@Html.Resource("REGMAPPING_COL_TYPE")</a></th>
                    <th class="col-3">@Html.Resource("REGMAPPING_COL_REFERENCE")</th>
                    <th class="col-4 sortable desc" title="@Html.Resource("REGMAPPING_SORT_BY_DATE")" data-sort="date" data-sort-dir="desc"><a href="#">@Html.Resource("REGMAPPING_COL_DATE")</a></th>
                    <th class="col-5">@Html.Resource("REGMAPPING_COL_DESCRIPTION")</th>
                    <th class="col-6">@Html.Resource("REGMAPPING_COL_LINKS")</th>
                    <th class="col-7"></th>
                </tr>
            </thead>
            <tbody>
                @{
                    int n = 0;
                    foreach (var reg in Model.Regulations)
                    {
                        @Html.RegulationMappingRow(reg, n);
                        n++;
                    }
                }
            </tbody>
        </table>
    </div>
</div>
 
 
<!-- modal popup to view documents list -->
<div id="dialog-document-list" title="@Html.Resource("REGMAPPING_DOCUMENTS")" class="d-hidden modal">
    <ul class="naked document-list">
        <li id="fr-doc-item" class="item">
            <a class="file" href="#" target="_blank">
                <span class="icon file-extension pdf"></span>
                <span class="name">@Html.Resource("BTN_FR_DOC_LINK")</span>
            </a>
        </li>
        <li id="en-doc-item" class="item">
            <a class="file" href="#" target="_blank">
                <span class="icon file-extension pdf"></span>
                <span class="name">@Html.Resource("BTN_EN_DOC_LINK")</span>
            </a>
        </li>
    </ul>
</div>
 
@section JsSection{
    <script type="text/javascript">
        function getRegulationDocs(enDocUrl, frDocUrl) {
            $('#en-doc-item').css('display', 'none');
            $('#en-doc-item > a').attr('href', '#');
            $('#fr-doc-item').css('display', 'none');
            $('#fr-doc-item > a').attr('href', '#');
            if (frDocUrl != "")
            {
                $('#fr-doc-item').css('display', 'block');
                $('#fr-doc-item > a').attr('href', frDocUrl);
            }
            if (enDocUrl != "") {
                $('#en-doc-item').css('display', 'block');
                $('#en-doc-item > a').attr('href', enDocUrl);
            }
            $('#dialog-document-list').dialog('open');
        }
    </script>
Any idea how to go about it ?

Thanks.