When working with the example in Code Ply, I have managed to successfully hide and show the arrow in the dropdown based on whether the button is clicked or not. However, after clicking anywhere else on the page, the dropdown items are hidden but the arrow remains invisible until I click the button again.
Is there a way to modify the javascript function so that the arrow appears or disappears automatically when the dropdown items are shown or hidden?
Your assistance in solving this issue would be greatly appreciated.
Many thanks for your help.