私は Web 開発の初心者で、次の基本的な質問があります。
私のHtmlは次のようになります:
<a class="btn-select" data-myId="10091" data-myDescr="The thing we delete">Click me!</a>
私のコーヒースクリプトは次のようになります。
$(document).on 'click', '.btn-select', ->
requestId = $(this).data('myId');
alert 'hello ' + requestId;
しかし、ボタンをクリックすると、「hello undefined」と表示されます。ここで何が欠けていますか?