Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Request] Glossary and/or FAQs
#11
A FAQ plugin would be brilliant!

I had the same plan and this ( http://getsimple.dare-is.nl/faq/) is what I have so far ...

Put next jQuery code in header
Code:
$('#faqs span').each(function() {
    var tis = $(this), state = false, answer = tis.next('div').hide().css('height','auto').slideUp();
    tis.click(function() {
        state = !state;
        answer.slideToggle(state);
        tis.toggleClass('active',state);
    });
});

Put next code in CSS
Code:
#faqs { position:relative; margin-left:10px;}
#faqs span {
    background: url(images/icon_plus.jpg) no-repeat left center;
    display: block;
    cursor:pointer;
    font-size: 15px;
    font-weight: normal;
    color: #3a3a3b;
    letter-spacing: -1px;
    padding: 6px 0 6px 26px;
    margin: 0 0 0 -10px;
}
#faqs span:hover    { color:#0099CC;}
#faqs span.active { color:#0099CC; background: url(images/icon_minus.jpg) no-repeat left center; }
#faqs div { height:0; overflow:hidden; position:relative; }
#faqs div p { position:relative; }

Create new page (example 'FAQ'), press button code and copy/paste next HTML code into it ...
Code:
<h1>Frequently Asked Questions</h1>
<div id="faqs">
    <span>Question A Lorem Ipsum?</span>
    <div>
        <p>Massa cum cras pid porttitor? Placerat? Odio. <a href="/">Pulvinar porta nascetur, sit pellentesque!</a>. Magna urna nec adipiscing aenean aliquet pid, ultricies in. Penatibus, mauris ac scelerisque ac a? Nec arcu rhoncus enim non et pulvinar placerat dignissim pulvinar massa hac!</p>
    </div>
    <span>Question B Lorem Ipsum?</span>
    <div>
        <p>Scelerisque vel augue adipiscing enim mauris integer lundium odio penatibus nisi lacus. Magna etiam platea scelerisque! Auctor? Magna turpis lorem tempor. Massa adipiscing, elementum, magna! Amet placerat eros nec scelerisque! Porta! Elementum placerat, et cras placerat sit, porta natoque, pellentesque urna.</p>
    </div>
    <span>Question C Lorem Ipsum?</span>
    <div>
        <p>Massa cum cras pid porttitor? Placerat? Odio. <a href="/">Pulvinar porta nascetur, sit pellentesque!</a>. Magna urna nec adipiscing aenean aliquet pid, ultricies in. Penatibus, mauris ac scelerisque ac a? Nec arcu rhoncus enim non et pulvinar placerat dignissim pulvinar massa hac!</p>
    </div>
</div>

The only thing you have to do is to alter the text. Not brilliant, but it works for sofar. Next step was to put text into a XML file. Hope some code is usefull for Mikeh.
Reply


Messages In This Thread
[Request] Glossary and/or FAQs - by nitsuj - 2011-04-26, 17:58:11
[Request] Glossary and/or FAQs - by mikeh - 2011-04-26, 21:59:10
[Request] Glossary and/or FAQs - by Oleg06 - 2011-04-26, 22:31:54
[Request] Glossary and/or FAQs - by mikeh - 2011-04-28, 00:17:10
[Request] Glossary and/or FAQs - by mikeh - 2011-05-04, 04:15:22
[Request] Glossary and/or FAQs - by Rene - 2011-05-05, 18:09:46
[Request] Glossary and/or FAQs - by mikeh - 2011-05-06, 00:57:21
[Request] Glossary and/or FAQs - by jlm - 2011-05-06, 04:16:26
[Request] Glossary and/or FAQs - by mvlcek - 2011-05-06, 05:00:31
[Request] Glossary and/or FAQs - by Rene - 2011-05-06, 06:41:16
[Request] Glossary and/or FAQs - by mikeh - 2011-05-06, 10:08:25
[Request] Glossary and/or FAQs - by mvlcek - 2011-05-06, 15:46:15
[Request] Glossary and/or FAQs - by mvlcek - 2011-05-06, 16:01:59
[Request] Glossary and/or FAQs - by mikeh - 2011-05-06, 16:12:00



Users browsing this thread: 2 Guest(s)