FAQ class functions on one page, not on others.

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Apr 09, 2015 9:17 am
Reply with quote
Report this post
Hi,

I have been using the faq class to create the faq vertical accordion style in Cloudhost.
Now it works on one page, but when i use it on other pages it does not work, i mean it does get the FAQ styling, but the items do not open and close.

working: http://v5.inconel.nl/verbindingen/thuisgebruik (on the bottom of the page).
not working: http://v5.inconel.nl/support/faq

Now yes, the working one is a module insert, and the non working one is html on the article page itself, but they are both plain html, and i have added the faq class to them (else the styling shouldn't work i assume?). I also tried it as a module, just like the working one, but still the same problem ( i even included the working module on another page, it does not function). this also happend on other pages, but inside the Tabs GK5 module (yes on styling, no on function).

I am out of ideas at this point, so any help is appreciated.
User avatar
Fresh Boarder

GK User
Thu Apr 09, 2015 10:55 am
Reply with quote
Report this post
*Update*

Found the problem, and a fix.
The current script looks if the .faq is also in .item-page, and our case is that it is not in .item-page.
bij changing:

Code: Select all
if(jQuery('body').find('.faq').length > 0 && jQuery('body').find('.faq').hasClass('item-page') {

to
Code: Select all
if(jQuery('body').find('.faq').length > 0 && jQuery('body').find('.faq').hasClass('item-page') || jQuery('body').find('.faq')) {


So now it looks for .faq inside .item-page, and also outside, so both work.
I hope this helps someone.
User avatar
Fresh Boarder


cron