Closed (fixed)
Project:
Frequently Asked Questions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
4 Aug 2010 at 18:05 UTC
Updated:
3 Jun 2020 at 17:18 UTC
Jump to comment: Most recent
Comments
Comment #1
stella commentedI'm totally sure I follow what you're requesting. If I understand it correctly, you want me to add a css class to the questions on the faq page if the user has already read that question/answer node page. To be honest, I think the browser should handle it for you with the a:visited state, so I'm not going to add such a css class.
Comment #2
Anonymous (not verified) commentedYes, browser can do that. But a:visited state do not allow to access the <a> tag parents. In this case some javascript/jQuery action is needed to access the parent. That's why I opened this ticket to add this javascript action in the module.
Comment #3
stella commentedI still don't understand your use case well enough to add this, not that I can see how to reliably - the user may have visited the faq node directly and there wouldn't be any knowledge of that on the faq page.
Comment #4
Anonymous (not verified) commentedOk, here are the practical case : http://sizemybike.com/faq
Customer of the site want to have a different style when a FAQ has been read.
For a non-expanded QA, here is the HTML code :
<div class="faq-question-answer">...For an expanded QA, here is the HTML code :
<div class="faq-question-answer expanded">...All I want to do is add the info indicating the QA has been opened. For example by adding viewed CSS class (or any better word) :
<div class="faq-question-answer viewed">...With this info a specific CSS style can be applied to the whole
I know how to implement it but my goal is to share it to the community.
Comment #5
stella commentedI'll consider it, but may not get time to work on it before the release I'm planning on doing next week. If you do have a patch already done, then I'm more than happy to review.
Comment #6
verta commentedRevised title to try to frame issue, feel free to revise further if this does not describe it correctly.
Comment #7
stella commentedAdded in a faq-viewed class. Note this only applies to faq nodes that have been expanded when using the 'Clicking on question opens/hides answer under question' layout. If the user views a faq node page, or navigates away or refreshes the faq page, then this context is lost and the user will have to expand the question again in order for the class to be applied.
Comment #8
stella commentedReleased in 6.x-1.12.