gk-faq

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jul 12, 2016 7:07 am
Reply with quote
Report this post
Hi,

A while ago I've used gk-faq on my website.

But now I see that the data rows won't collapse when clicked on

Can you see what I've been missing?

website
User avatar
Expert Boarder

GK User
Wed Jul 13, 2016 8:40 pm
Reply with quote
Report this post
Hi,

As I remember gk-faq is not included in a template which you are using so you should also include the below script:

Code: Select all
// FAQ
jQuery(function() {
   jQuery('.gk-faq').each(function(i, faq) {
      var dt_list = jQuery(faq).children('dt');
      dt_list.each(function(i, dt) {
         dt = jQuery(dt);
         dt.click(function() {
            dt_list.each(function(j, dt_element) {
               if(i !== j) {
                  jQuery(dt_element).removeClass('active');
               }
            });
            dt.toggleClass('active');
         });
      });
   });
});
User avatar
Moderator

GK User
Thu Jul 14, 2016 7:38 am
Reply with quote
Report this post
Tidy wrote:Hi,

As I remember gk-faq is not included in a template which you are using so you should also include the below script:

Code: Select all
// FAQ
jQuery(function() {
   jQuery('.gk-faq').each(function(i, faq) {
      var dt_list = jQuery(faq).children('dt');
      dt_list.each(function(i, dt) {
         dt = jQuery(dt);
         dt.click(function() {
            dt_list.each(function(j, dt_element) {
               if(i !== j) {
                  jQuery(dt_element).removeClass('active');
               }
            });
            dt.toggleClass('active');
         });
      });
   });
});


Yes, it worked! Many tnx! :mrgreen: :
User avatar
Expert Boarder


cron