javascript - Change Parent Div Background onclick form multiple Child Div li -
i trying make parent div background img change onclick wwith multiple li instances. each li should change background map of state. doing 1 instance this works: <ul> <li><div class="panel-heading" role="tab" id="statenine"> <h3 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion3" href="#stateal" aria-expanded="false" aria-controls="stateal">alabama | </h3></div> </li> <script>function changebackground() { event.currenttarget.classname = ('bucketal'); }</script>` this works once, fires last script instance on every button, ignoring previous. background changes last instance's background. there total # of 9 ...