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
// 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');
});
});
});
});
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');
});
});
});
});