Created
April 7, 2015 14:27
-
-
Save Shinpeim/85a7af15be09a3e769d7 to your computer and use it in GitHub Desktop.
This file contains 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
// まずこうすれば関数はひとつにまとめられて | |
function renderNotes(key, cssId){//key1notesの中の状態を探って、それを#key1の鍵盤に反映させる関数 | |
if(key.notes!=null){ | |
for(var i=0;i<key1.notes.length;i++){ | |
var kari= cssId + " ." + key.notes[i]; | |
$(kari).addClass("osu"); | |
}//for文 | |
} else{ | |
key.notes=[]; | |
} | |
} | |
renderNote(key1, "#key1"); | |
renderNote(key2, "#key2"); | |
renderNote(key3, "#key3"); | |
renderNote(key4, "#key4"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment