Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my code accordion div refersh every 5 second in so how set Scrollbar Position in accordion using javascript...Please me

<pre lang="Javascript">

JavaScript
jQuary Code

     setInterval(function () {

         
            $("#accordion").accordion();
            getIBtrade();
            
           
            
         
        }, 5000);


     

        function getIBtrade() {
            var id = document.getElementById("hdibid").value;
            //alert('Hi');
            $.ajax({
                type: "POST",
                url: "Home.aspx/GetData",
                data: "{IBid:" + parseInt(id) + "}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                 
                  var list = document.getElementById("accordion");
                  list.innerHTML = response.d;
                  $("#accordion").accordion("destroy");
                  $("#accordion").accordion();
                  //alert('hii');

                        
                }
            });


        }


   $(document).ready(function () {
          
            $("#accordion").accordion();
                getIBtrade();
                getTotal();
            //$("body").css("overflow", "hidden");

                $("#accordion").msAccordion({ defaultid: 0, autodelay: 4 });
        });


html Code

  
                &lt;div id="accordion"&gt;
Posted
Updated 8-Aug-16 4:45am
v4
Comments
Krunal Rohit 6-Aug-16 4:26am    
Format your question with proper language tag. And elaborate your question more, because would be adjusted automatically once you have the data.

KR

1 solution

You need to first check the documentation as you have asked a couple of questions about this already. Accordion Widget | jQuery UI API Documentation[^]

I do not see a property so I suggest you change your page so it does not refresh every so often. Use $.ajax() to retrieve whatever you need instead of refreshing your page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900