Accordion using javascript-Not working

I am trying to create an accordion using javascript, but it is not working. Can anyone tell me what I am doing wrong here?

I have created a pen for this,please visit this link --> (

Thanks in advance

Rather then giving you the answere I want you to follow the bellow steps:

click the symbole that looks like this ^ but upside down.Then select: analyze JS

when I am analysing, It is saying that style is undefined but I have already declared in css for that class(.content)