• I am trying to add the ::after psuedo class to ‘active’ items to have an upward facing arrow.

    I have the accordion set to have the first item open by default. But initially it doesn’t have the class ‘active’. Only once you click to close it and then open it again does it gain the class ‘active’.

    Therefore, the upward arrow doesn’t show until closed and opened again, which isn’t ideal.

    Any help solving this would be greatly appreciated!

    Many thanks,

    Richard

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    I’m not sure where the active class is coming from. This plugin uses the class open to indicate when an accordion is open. The class is there when an item is open and removed when closed. If you’d like to add an arrow, I’d suggest adding it on the .accordion-title.open {} selector.

    Thread Starter rnbutler87

    (@rnbutler87)

    Hi thanks for the reply. I’ve tried this but there seems weirdness with class attribution. Even when I close the open tab (set to open as default) it still maintains it’s open class.

    My theme has an accordion shortcode itself but I’ve added the config file code to try resolve this. Incidentally, I’m choosing to use a third party plugin so that I’m not fenced in to using a specific theme at some later date.

    Plugin Author philbuchanan

    (@philbuchanan)

    There is a possibility that the theme (or some other plugin) is still interfering with this plugin. The active class that is being added isn’t being added by this plugin, so it really shouldn’t be there.

    I’d suggest reaching out to your theme author and see if they can assist.

    Thread Starter rnbutler87

    (@rnbutler87)

    Ok thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘First open by default doesn’t have the class ‘active’’ is closed to new replies.