× Got a CSS, HTML or webdesign question? Ask it here!

Javascript issue with accordion

11 months 1 day ago - 11 months 1 day ago #17419 by JimUMFan
I FIGURED IT OUT

It was still bugging me that I didn't know how it was broken so I looked into it a little bit more.

It previously wasn't working because you had the <button> inside of a <p> element. That broke it because the javascript is using "this.nextElementSibling" which returns the next element with the same parent, but because the <button> element was the only child of the <p> element it had no siblings so that function returned nothing. The panel variable contained nothing and caused the remaining javascript to break.
The following user(s) said Thank You: adamp, sgarofalo

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum

Latest from our blog

This Week in Catalog - May 18, 2018

This Week in Catalog - May 18, 2018 I have two big announcements to make in regards to the DecoNetwork catalogs. We read and listen to your complaints and suggestions. Recently, I...Read More

DecoNetwork 8 - Available Now!

DecoNetwork 8 - Available Now! After an incredible amount of work in design, development, and testing, DecoNetwork 8 is here! With version 8, we recommitted ourselves...Read More

This Week in Catalog: May 11, 2018

This Week in Catalog: May 11, 2018 Lately, we've been getting a lot of new products in each week. More than is typical. All those new products (mostly in the S&S Activewear...Read More

DecoNetwork 8 - Update 2 now available: SEO Improvements and more (+75 tasks implemented)

DecoNetwork 8 - Update 2 now available: SEO Improvements and more (+75  tasks implemented) DecoNetwork 8 was released just ten days ago, but we have already a second update (8.002) available for you with many improvements and fixes...Read More

This Week in Catalog: May 4, 2018

This Week in Catalog: May 4, 2018 Happy Star Wars Day to the fans out there. There was a lot going on this week with our official launch of Version 8. However, we did manage to...Read More