I have a code snippet that is currently operational, but I am looking to enhance it by displaying one div at a time.
If you would like to view the code, please visit my CodePen link below:
https://codepen.io/danongu/pen/YzXvpoJ
Due to the extensive amount of HTML and CSS in the code, I refrained from sharing the entire content. My primary issue lies with the JavaScript portion.
My objective is as follows:
Upon clicking the 'Section A Book List' button, only the 'PREVIOUS VERSIONS A' and 'NEW VERSIONS A' sections should be visible.
Similarly, when selecting the 'Section B Book List' button, only the 'PREVIOUS VERSIONS B' and 'NEW VERSIONS B' sections should appear.
Regarding the black areas for 'Book 1' and 'Book 2,' I aim to display 'BOOK 1' when 'Book 1' is clicked, and 'BOOK 2' when 'Book 2' is selected.
Essentially, I require some form of conditional show/hide functionality. I attempted to implement this using jQuery in the provided CodePen example, but I encountered difficulties progressing beyond that point.
Your insights are greatly appreciated. While I made an initial effort, I reached an impasse during the process.