Support » Plugin: HTML5 Responsive FAQ » More same FAQs at one page – JS improvement

  • hrf-script.js

    
    jQuery(function($){
       $(document).ready(function(){
          
          $('.hrf-title').click(function(){
             var $this = $(this)
                 ,$parent = $this.parent()
                 , my_content_id = $this.attr('data-content-id')
             ;
    
             $parent.find('#' + my_content_id).slideToggle();
             $this.toggleClass(function(){
                if ($(this).is('.close-faq')) {
                   return 'open-faq';
                } else {
                   return 'close-faq';
                }
             });
          }); //.hrf-title click
       });
    });
    
Viewing 1 replies (of 1 total)
  • Came here to post a similar request. It would be nice if the plugin appended the category onto the ID. If a FAQ is posted under multiple categories as desired, it’s currently failing to open the second category due to redundant ID’s. I did this in the plugin quite easily using the category slug already available and it fixed the issue.

    Also the option to close all other FAQ if you open a new one would be a simple option/enhancement.

    • This reply was modified 5 months, 1 week ago by  designerwood.
    • This reply was modified 5 months, 1 week ago by  designerwood.
    • This reply was modified 5 months, 1 week ago by  designerwood.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.