![]() |
Search:
|
Page last modified 15:10, 16 Apr 2012 by tehmina.khan
Template:News/Forums/Polls/Q&A > Template:SimpleFAQ
Template:SimpleFAQTable of contentsNo headersvar AnswerBackGround = ($AnswerColor ?? $0 ?? "#faf8f9; background: -moz-linear-gradient(center top , #ffffff, #C9B6C7) repeat scroll 0 0 transparent; background: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, #ffffff), color-stop(1.00, #C9B6C7)); filter: progid:dximagetransform.microsoft.gradient(enabled='true',startcolorstr=#ffffff,endcolorstr= #C9B6C7); background-image:-o-linear-gradient(#ffffff, #C9B6C7);"); ; var QuestionBackGround = ($QuestionColor ?? $1 ?? '#e7e7e7'); var AnswerSize = ($AnswerTextSize ?? $2 ?? '1.0em'); var QuestionSize = ($QuestionTextSize ?? $3 ?? '1.5em'); <p><label>'Quick Search: '</label><input type="text" id="FilterTextBox" name="FilterTextBox" /></p> <html><head> <script type="text/javascript">" $(document).ready(function(){ $('.tablefaq').attr('border',0); $('.tablefaq tr:even').addClass('tblQuestion'); $('.tablefaq tr:odd').addClass('tblAnswer'); $('.tblAnswerDiv').hide(); $('tr.tblQuestion').click(function() { $('.arrow').removeClass('up');$('div.tblAnswerDiv').hide(); $(this).find('.arrow').toggleClass('up'); $(this).find('div.tblAnswerDiv').toggle(); $('.tblAnswer').show(); }); $('.tablefaq tr:even').each(function() { var QuestionCnts = $(this).find('td').eq(0).html(); var AnswerCnts = $(this).next('tr.tblAnswer').html(); $(this).next('tr.tblAnswer').html(''); $(this).find('td').eq(0).html('<span class=\"arrow\"></span><div class=\"tblQuestionDiv\">' + QuestionCnts + '</div><div class=\"tblAnswerDiv\">' + AnswerCnts + '</div><div> </div>'); $(this).find('td').eq(0).find('.tblAnswerDiv').hide(); }); //add index column with all content. $('.tablefaq tr:has(td)').each(function(){ var t = $(this).text().toLowerCase(); //all row text $('<td class=\"indexColumn\"></td>') .hide().text(t).appendTo(this); });//each tr $('#FilterTextBox').keyup(function(){ var s = $(this).val().toLowerCase().split(' '); //show all rows. $('.tablefaq tr:hidden').show(); $.each(s, function(){ $(\".tablefaq tr:visible .indexColumn:not(:contains('\" + this + \"'))\").parent().hide(); });//each });//key up. }); "</script> <style type="text/css">" .tablefaq {border-style:none; border:0;} .tblQuestion span.arrow { float:left; margin-top: 10px; margin-right:5px; background:transparent url(http://developer.mindtouch.com/@api/deki/files/4810/=arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;} .tblQuestion span.up { background-position:0px 0px;} .tblAnswerDiv {padding-left:20px; background:"..AnswerBackGround.."; font-size:"..AnswerSize.."; font-weight:normal; } .tblQuestionDiv { background:"..QuestionBackGround.."; font-size:"..QuestionSize.."; font-weight: normal; width=100%; } "</style> </head></html> |
|
Powered by MindTouch Core |