testing coffeescript and jquery

master
Jordan Han 2019-05-13 17:13:11 +08:00
parent 1aad32e06f
commit 2c048141ab
3 changed files with 9 additions and 4 deletions

View File

@ -1,8 +1,11 @@
#= require jquery-3.4.1.slim.js
$(document).ready ->
console.log "JQuery running"
console.log "Document ready."
console.log "{{ site.title }}"
audio = new Audio('{% asset CB.WAV %}')
audio.play();
$(document).click ->
console.log "Test:"
$('.sequencer-button').each ->
console.log $(this).attr('row') + "," + $(this).attr('col') + ": " + $(this).prop('checked')

View File

@ -83,6 +83,7 @@ assets:
- assets/image
- assets/img
- assets/js
- assets/audio
- _assets/styles
- _assets/css
- _assets/fonts
@ -93,6 +94,7 @@ assets:
- _assets/image
- _assets/img
- _assets/js
- _assets/audio
- styles
- css
- fonts

View File

@ -12,7 +12,7 @@ categories: toys
<div class="sequencer" >
{% for y in (1..4) %}
{% for x in (1..8) %}
<input class="sequencer-button row-{{y}} col-{{x}}" type="checkbox" />
<input class="sequencer-button" row="{{y}}" col="{{x}}" type="checkbox" />
{% endfor %}
{% endfor %}
</div>