How do I hide others when I click one item?

  • 0
    Hello everyone, the script on the site is not working correctly.
    When pressed, the script runs every other time and collapses the elements in the wrong way. There is a block on the right side, there are 4 floors. By clicking on each floor, the corresponding floor slider should appear. It works, but sometimes two floors appear at once.
    JavaScript Lucy Hodge, Jul 18, 2020

  • 1 Answers
  • 0
    DOM objects have a hide () property like. You just add a function to the onclick () object and write hide () there for the rest.

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!