orbit_demo_new_old4/modules/faq/faq_index2.html.erb

38 lines
1.2 KiB
Plaintext

<div class="index-faqs index2">
<h3 class="index-title">
<span>{{page-title}}</span>
</h3>
<ul class="list-unstyled" data-list="faqs" data-level="0">
<li class="index-content">
<h4 class="index-content-title-wrap" aria-expanded="false">
<span class="index-content-title">{{question}}</span>
<span data-list="statuses" data-level="1">
<span class="label status {{status-class}}">{{status}}</span>
</span>
</h4>
<section class="post">
<p>{{answer}}</p>
<div data-list="qa_files" data-level="1"><div><a href="{{file_url}}" target="_blank">{{file_title}}</a></div></div>
</section>
</li>
</ul>
</div>
{{pagination_goes_here}}
<script>
$('.index-faqs.index2 .index-content .index-content-title-wrap').click(function(){
$('section.post').slideUp(200);
$(this).removeClass('open');
if($("+section",this).css("display")=="none"){
$("+section",this).slideDown(300);
$(this).addClass("open");
}
if( $('.index-content-title-wrap').hasClass('open') ) {
$(".index-content-title-wrap").attr("aria-expanded","true");
}
else {
$(".index-content-title-wrap").attr("aria-expanded","false");
}
})
</script>