WordPress.org

Forums

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

  1. johndove523
    Member
    Posted 1 year 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 1 year 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 year ago #

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

  4. SPTechnolab
    Member
    Plugin Author

    Posted 1 year 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 year ago #

    I got it, thanks!

  6. Ilya
    Member
    Posted 1 year 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 year 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
    }`

  8. smtotman
    Member
    Posted 12 months ago #

    This does not work for me. It deactivates the jquery, so there is no javascript working once I change it. If I change it back, it works as it did before, with the first question expanded. Any other suggestions? Thanks!

  9. SPTechnolab
    Member
    Plugin Author

    Posted 12 months ago #

    Hello,

    please send me your dev server site username and password..

    thanks

  10. smtotman
    Member
    Posted 12 months ago #

    Thank you. Couldn't find a way to PM you here, so sent a message via your website. Thanks for any insight.

    Sue

  11. smtotman
    Member
    Posted 12 months ago #

    You requested to connect with me via Skype, so I did. I have not heard back, however, in 2 days. Any idea how I can collapse the first question?? Thanks!

  12. SPTechnolab
    Member
    Plugin Author

    Posted 11 months ago #

    Hello plz send me your dev sever wordpress admin username and password on my mail id

    aranawat@sptechnolab.com

    thanks

  13. Leash22
    Member
    Posted 10 months ago #

    Hi,

    I am also having the same issues.

    What was the solution?

  14. CatalinaBackcountry
    Member
    Posted 10 months ago #

    Hi,

    I was wondering the same thing. I would like to keep the accordion layout but would prefer that the 1st question not be expanded, as it currently appears/defaults. I did replace the code as provided above, but it seems to do exactly the opposite of what I was hoping. It is removing the accordion layout and expanding all the questions.

    Can you please advise on a possible solution?

    Thanks!

  15. SPTechnolab
    Member
    Plugin Author

    Posted 10 months ago #

    hello,
    Can you plz upload your website to your DEV server so that i can check your problem.
    Thanks

  16. ivan_revz
    Member
    Posted 10 months ago #

    Sir I got the same problem and now I am sad as there is no solution posted in regards with the issue :( please help....

  17. SPTechnolab
    Member
    Plugin Author

    Posted 10 months ago #

    Hello,

    Plz give me 1 day time, i will upgrade this plugin with a setting option.
    where you can solve your problem.

    Thanks

  18. ivan_revz
    Member
    Posted 10 months ago #

    Thank you sir... :)

  19. Leash22
    Member
    Posted 10 months ago #

    For all having this issue use this:

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

    Worked for me a treat! Just need to target the class and not the ID

  20. ivan_revz
    Member
    Posted 10 months ago #

    Dude you are very awesome... Thanks a lot you really save me from darkness... :)

    Leash22 - Thank you...

  21. CatalinaBackcountry
    Member
    Posted 10 months ago #

    Leash22 - Thank you! I was able to fix this with your remedy.

    SPTechnolab - Thanks for a great plugin!

  22. SPTechnolab
    Member
    Plugin Author

    Posted 9 months ago #

    For all having this issue use this

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.