javascript - Having 2x onClick within the same tag -
this might have 'event bubbling' how can have 2 onclick events (1 expand img , 1 return original size) within same tag?
e.g
<img class="a1" width="140" height="140" onclick="this.width=420;this.height=560;" onclick="this.width=140;this.height=140;" /> as second onclick doesn't work.
thanks in advance!
not javascript, you'll idea
onclick(){ isclicked ^= true if(isclicked){ //do } else{ //do else } }
Comments
Post a Comment