WordPress.org

Ready to get started?Download WordPress

Forums

SP responsive wp-faq with category plugin
[resolved] Can I not have the first FAQ expanded? (7 posts)

  1. johndove523
    Member
    Posted 8 months ago #

    By default, the first FAQ's answer is expanded. I want the all closed. Should be a simple modification (?)

    http://wordpress.org/plugins/sp-faq/

  2. SPTechnolab
    Member
    Plugin Author

    Posted 8 months ago #

    Hello,
    Its very simple. please go to faq.php (Under plugin > Sp-faq) and replace this javascript code with the existing one

    <script type="text/javascript">
    
    	  jQuery( "#accordion" ).accordion({
    heightStyle: "content",
    collapsible : true, active : 'none'
    });
    	</script>

    Its in the last may be line no 141

  3. Ilya
    Member
    Posted 1 month ago #

    Can you please explain one more time what to do with the code? Thank you!

  4. SPTechnolab
    Member
    Plugin Author

    Posted 1 month ago #

    Hello,

    This Plugin use simple jquery UI to create accordion. So in plugin dir > go to faq plugin dir and open faq.php file in any editor and check the js code in the file may be line no 141 and replace that js code with this code

    <script type="text/javascript">
    
    	  jQuery( "#accordion" ).accordion({
    heightStyle: "content",
    collapsible : true, active : 'none'
    });
    	</script>
  5. Ilya
    Member
    Posted 1 month ago #

    I got it, thanks!

  6. Ilya
    Member
    Posted 1 month ago #

    Hey, I guess it's not a line 141 since it gives an error and deactivates the plugin if I replace line 141 with the code you provided.

  7. SPTechnolab
    Member
    Plugin Author

    Posted 1 month ago #

    hello,

    Just replace the script inside this function "function myfaqscript()"

    Here is this function just search
    `function myfaqscript() {
    ?>
    <script type="text/javascript">

    //jQuery( "#accordion" ).accordion();

    jQuery( ".accordion" ).accordion({
    heightStyle: "content"
    });
    </script>
    <?php
    }`

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.