Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Akruti 30 posts 50 karma points
    Nov 06, 2009 @ 06:19
    Akruti
    0

    FAQ help

    Hey I want to create a FAQ section in my umbraco website similar to what is there in this link.The link is http://www.telerik.com/purchase/faqs/telerik-premium-collection-for-dotnet.aspx. Please help me with the javascript as to how can I achieve this.

     

    Akruti.

  • skiltz 501 posts 701 karma points
    Nov 06, 2009 @ 07:11
    skiltz
    1

    What do you specifically need help with?  Do a search for jQuery Accordion Panel... something like http://www.learningjquery.com/2007/03/accordion-madness

    Hope this helps

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Nov 06, 2009 @ 08:54
    Thomas Höhler
    1

    We are using http://jqueryui.com/demos/accordion

    It's really easy to implement. We have the following structure:

    FAQs
    - Section
    -- Item with Question and Answer as Genericic Property (RichText Editor)

    So my xslt is:

    <xsl:template match="/">
    <xsl:for-each select="$currentPage/node">
    <h2><xsl:value-of select="@nodeName" /></h2>
    <div class="faq">
    <xsl:for-each select="node">
    <h3>
    <a href="#">
    <xsl:value-of select="position()"/>. <xsl:value-of select="data [@alias='Question']" disable-output-escaping="yes" />
    </a>
    </h3>
    <div>
    <xsl:value-of select="data [@alias='Answer']" disable-output-escaping="yes" />
    </div>
    </xsl:for-each>
    </div>
    </xsl:for-each>
    </xsl:template>

    And in my template I have:

    <script src="/scripts/jQuery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="/scripts/jQuery/UI/jquery-ui-1.7.1.min.js" type="text/javascript"></script>
    <link href="/scripts/jQuery/UI/css/ui.all.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    $(function() {
    $(".faq").accordion({
    autoHeight: false,
    collapsible: true,
    active: false
    });
    });
    </script>

    jQuery itself I have in the master template, so it isn't

    hth, Thomas

  • Akruti 30 posts 50 karma points
    Nov 06, 2009 @ 09:52
    Akruti
    0

    Hey thanks for your reply. I will try these things.

Please Sign in or register to post replies

Write your reply to:

Draft