EasyCFM.COM ColdFusion Forums / Coding Help! / Bootstrap Accordion

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Bootstrap Accordion

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts first

WolfShade
05-16-2013 @ 7:14 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Member
Posts:
Joined: Apr 2013

Are there any messages in the JavaScript or error console?

id="#getFaq.CurrentRow#" (IDs cannot start with an integer - must start with letter or underscore.)

That's all I can currently think of.


^_^

dumbstroke8
05-15-2013 @ 5:10 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 65
Joined: Nov 2004

Does anyone have any experience using twitter's
bootstrap and its accordion function?

I creating a FAQ page that should list the questions
with the answers in the accordions. Using a query works
fine. The issue is that I cannot get the hyperlink and
collapse of the accordion to work.

Code is below.

Any and all help greatly appreciate.

<cfquery name="getFaq"
datasource="#request.site.mainDSN#">
  SELECT      faqID, faqQuestion, faqAnswer
  FROM      faq
</cfquery>

<div class="accordion" id="accordion2">
  <cfloop query="getFaq">
    <div class="accordion-group">
    <cfoutput>
      <div class="accordion-heading">
        <p><a class="accordion-toggle" data-
toggle="collapse" data-parent="##accordion2#"
href="##getFaq.CurrentRow#">#getFaq.faqQuestion#</a>
</p>
      </div>
      <div id="#getFaq.CurrentRow#" class="accordion-
body collapse in">
        <div class="accordion-inner">
       <p>#Replacenocase(getFaq.faqAnswer,chr(10),"
<br>", "ALL")#</p>
        </div>
      </div>
    </cfoutput>
    </div>
  </cfloop>
</div>



Website Designed and Developed by Pablo Varando.