I have 10 html divs with same class name “dp-check” which i am using as a component
and used at lots of time in the same page. Now my problem is initially all divs are hidden when i clicks one of them then its “display” is set to “inline”(only of that instance) and all others are hidden, I want to close when any other div with same class name is shown or somewhere else on page is clicked.
I have 10 html divs with same class name dp-check which i am using
Share
Try this:
You’ll have to assign the
clickHandlerto the click events on the elements.