我在文章中使用了《 UIkit手风琴》,我需要创建一个指向手风琴《标题》的链接并打开它的内容。如何才能做到这一点 ? 这是代码示例:
链接:
<a href="#Title2">Go and Open Title2</a>
手风琴:
<div class="uk-accordion" data-uk-accordion="{showfirst: false}"><h3 id="Title1" class="uk-accordion-title">Title1</h3> <div class="uk-accordion-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div><h3 id="Title2" class="uk-accordion-title">Title2</h3><div class="uk-accordion-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor ncididunt ut labore et dolore magna aliqua.</div> </div>
我希望光标将定位在“ Title2”中,而手风琴“ Title2 Content”将被“打开”