Last active
January 21, 2018 17:19
-
-
Save Franckapik/f622628cfb804afa482bba63bd7ea5b3 to your computer and use it in GitHub Desktop.
Multiple ID function to one
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
| document.getElementById("color-1").addEventListener("click", function() { | |
| if (_previous_selected_obj) { | |
| colorize("color-1", "mat1"); | |
| modeleTable[_previous_selected_obj.origin_name.substring(6, 7)] = "N1"; | |
| } else { | |
| notify("[WARNING]"); | |
| } | |
| }, false); | |
| HTML | |
| <div class="option-content"> | |
| <div id="color-1" class="circle"> | |
| </div> | |
| <div id="color-2" class="circle"> | |
| </div> | |
| <div id="color-3" class="circle"> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.