Using accordion code from codepen on classic SharePoint page

vrm 691 Reputation points
2022-09-14T11:14:10.31+00:00

Hi,
I am trying to use the code developed by Lewis Briffa (qjwqLb) on a classic SharePoint page.
I put the CSS and javascript into Content Editor web parts.
I commented out the body CSS code because it was affecting the entire page.

It's been years since I have played with CSS seriously. I don't know Javascript.
I appreciate the assistance.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,622 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
866 questions
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 31,071 Reputation points Microsoft Vendor
    2022-09-19T05:53:34.957+00:00

    Hi @vrm
    I have found a nice sample about accordions without javascript. Please make a reference
    https://codepen.io/alvarotrigo/pen/jOYNvVO


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. vrm 691 Reputation points
    2022-09-16T22:36:12.89+00:00

    Hi @RaytheonXie_MSFT ,
    Thank you for responding. Since the javascript seems to be the issue, I am investigating pure CSS accordions on CodePen.

    0 comments No comments