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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -