简体   繁体   中英

jQuery UI Accordion Is Choppy

I am trying to use the accordion function built in to the jQuery UI. It works fine, but the animation is very choppy, I can't seem to figure out why. I've looked at other answers on here, and none have worked so far.

jQuery:

<script>
  $(function() {
    $( ".accordion" ).accordion({ animate: true },{ heightStyle: "content" });
  });
</script>

HTML:

<ul class ='accordion'>
<li>
    <h3><!-- heading --></h3>
    <p><!-- content --></p>
</li>
<li>
    <h3><!-- heading --></h3>
    <p><!-- content --></p>
</li>
<li>
    <h3><!-- heading --></h3>
    <p><!-- content --></p>
</li>
</ul>

All this markup and code is contained in the same HTML file.

It probably depends on what browser you are on. Many jQuery UI animations in IE8 and below are very 'choppy'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM