###現状
node.js + express + jadeでwebアプリを作っているのですが
以下の状況でJqueryが反応しません
###発生している問題・エラーメッセージ
*layout.jade
jade
1doctype html 2html 3 head 4 title= title 5 link(rel='stylesheet', href='/stylesheets/style.css') 6 script(src="https://code.jquery.com/jquery-3.1.1.slim.js") 7 block head 8 body 9 block content 10
- index.jade
jade
1extends layout 2 3block head 4 script(type='text/javascript'). 5 $(function(){ //① 6 alert('jQuery is ready.'); 7 $('#messages').append($('<li>').text('jquery')); 8 }); 9 10 $('li:first').on('click', function(){ //② 11 $('#title').text('ok'); 12 alert('jQuery is ready.'); 13 }); 14 15block content 16 #controls 17 form(action='') 18 input(type="text" id="m" placeholder="Message") 19 input(type="submit" id="sub" value="送信") 20 ul#messages 21 #title title 22
###詳細
index.jadeの①は実行されるのですが
②が実行されません
###その他
- express: "^4.15.3"
- jade: "~1.11.0"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。