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 #= require jquery-3.4.1.slim.js
$(document).ready -> $(document).ready ->
console.log "JQuery running" console.log "Document ready."
console.log "{{ site.title }}"
audio = new Audio('{% asset CB.WAV %}') 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/image
- assets/img - assets/img
- assets/js - assets/js
- assets/audio
- _assets/styles - _assets/styles
- _assets/css - _assets/css
- _assets/fonts - _assets/fonts
@ -93,6 +94,7 @@ assets:
- _assets/image - _assets/image
- _assets/img - _assets/img
- _assets/js - _assets/js
- _assets/audio
- styles - styles
- css - css
- fonts - fonts

View File

@ -12,7 +12,7 @@ categories: toys
<div class="sequencer" > <div class="sequencer" >
{% for y in (1..4) %} {% for y in (1..4) %}
{% for x in (1..8) %} {% 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 %}
{% endfor %} {% endfor %}
</div> </div>