명시 적 응용 프로그램에 jquery js 파일을 포함시키는 데 문제가 있습니다./국민/자바 스크립트 폴더에 나는 jquery.js 파일을 추가하고 난 다음에 따른다 내 layout.jade 파일을 변경 :express js 앱에 jquery mobile을 올바르게 포함하십시오.
!!!5
html
head
title= title
meta(name='viewport', content='width=device-width,initial-scale=1')
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/stylesheets/jquery.mobile-1.0.1.min.css')
script(type='text/javascript', src='/javascripts/jquery.mobile-1.0.1.min.js')
script(type='text/javascript', src='/javascripts/jquery-1.7.2.min.js')
body!= body
나는 또한 app.use 포함 (express.static (__이 dirname + '공개 /')); 내 app.js.I 내 index.jade을 변경 일부 JQuery와 모바일 태그를 포함하는 다음과 같이
div(data-role='page')
div(data-role='header')
h1= title
div(data-role='content')
ul(data-role='listview',data-inset='true',data-filter='true')
li: a(href='#') Acura
문제는 내가 웹 페이지가 제대로 렌더링 얻을 수 있다는 것입니다. jquery와 관련된 스타일을 전혀 볼 수 없습니다. 어떤 몸이라도 그 문제를 어떻게 해결할 수 있는지 알고 있습니까?
덕분에, 당신은 후자가 전자의 확장 때문에 jQuery를 모바일 파일 전에 jQuery를 핵심 파일을 포함 할 필요가
나를 위해 작동하지 않습니다. jquery 핵심 버전을 변경하고 주문을 변경했습니다. –
스크립트를 스크립트로 변경 한 경우 (type = 'text/javascript', src = 'http : //code.jquery.com/jquery-1.6.4.min.js') 스크립트 (type = 'text/javascript ', src ='http : //code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js ') \t 전체 경로를 사용하면 작동합니다. –
그 해결책을 찾은 것 같아요. 내가 jquery 파일 이름을 변경하고 지금은 잘 작동합니다. 하지만이 문제를 해결하는 데 도움이되는 유용한 팁이 포함되어 있으므로이 답을 올바르게 표시하겠습니다. –