Last active
November 22, 2018 17:38
-
-
Save syntaxhacker/6f24bff5a7fdd0463b8333da7816bc77 to your computer and use it in GitHub Desktop.
set a JavaScript onclick event to a class with css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cliked(){ | |
| document.body.onclick= function(e){ | |
| e=window.event? event.srcElement: e.target; | |
| if(e.className && e.className.indexOf('event1')!=-1){ | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment