[Resolved] Accordian

Home Forums Support [Resolved] Accordian

Home Forums Support Accordian

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #989935
    Darren

    Hi, I am trying to implement this accordian solution found on https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_accordion_animate

    Unfortunately the accordian doesn’t open on my GP site, I added the javascript via a Hook element in wp_footer not sure why it doesn’t open?

    Thanks
    Darren

    #990153
    Tom
    Lead Developer
    Lead Developer

    This is happening because WordPress is adding <p> elements around the buttons, which is breaking the JS.

    If you’re using Gutenberg, try adding the HTML into an HTML block instead.

    #990452
    Darren

    Thanks Tom, with the javascript placed in the header or footer it wasn’t working, but it’s working if I use after_main_content, elements to the rescue! thanks:)

    #990588
    Tom
    Lead Developer
    Lead Developer

    Awesome, glad you got it working ๐Ÿ™‚

    #990772
    Darren

    hi tom, although not GP related I’m having issue on my faq page when the columns of the accordian doesn’t have a matching number of rows on each side is there a css fix for this possibly?

    #990852
    Darren

    Not to worry I just place the unequal columns last. Looks fine now.

    #991210
    Tom
    Lead Developer
    Lead Developer

    Cool ๐Ÿ™‚

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.