I would like to add to an existing FAQ page on our company website. All I want to do is to have clickable questions (answers hidden). Click the question and the answer appears! Does anyone have a code for this?
javascript get and expand
Collapse
X
-
Originally posted by AnnBI would like to add to an existing FAQ page on our company website. All I want to do is to have clickable questions (answers hidden). Click the question and the answer appears! Does anyone have a code for this?
Use <a>Anchors</a> onclick event you can show the answer by toggling visibility on a div tag. Easy Peasy -
Originally posted by AnnBthank you so much! Could you give me an example because I don't know about toggling visibility stuff.
document.getEle mentByID('TheTh ingYouWantToTog gle').style.vis ibility=visible ; or document.getEle mentByID('TheTh ingYouWantToTog gle').style.vis ibility=hidden;
I Think you should start with checking to see if you can get a method hooked up to the link.Comment
Comment