Topic: Bootstrap Accordion


dumbstroke8    -- 05-15-2013 @ 5:10 PM
  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>



WolfShade    -- 05-16-2013 @ 7:14 AM
  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.


^_^


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=12&Topic=15317