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

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -