html - Make the span element inside div clickable -


i have dropdown list using javascript. inside div have span element text div, because want show/hide text according screen size. added span element span area not clickable. other parts in div clickable , show menu, except area span. how make span clickable well?

here's code:

<div onclick="dropdownfunction()" class="dropbtn"><span>my list &nbsp;</span> <i class="fa fa-arrow-circle-down" aria-hidden="true"></i></div> 

and codepen: http://codepen.io/nfds89/pen/mylgkr

an alternate css-only solution pass through clicks on <span> , <i>

.dropbtn span, .dropbtn {   pointer-events: none; } 

enter image description here


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -