내 인덱스 파일에 어떤 페이지에서도 변경되지 않는 레이아웃 코드가 포함되어 있습니다. 페이지의 내용이 표시되는 곳에서는 GET 변수를 사용하여 포함 할 PHP 파일을 결정합니다. jquery 날짜 선택 도구 (http://jqueryui.com/datepicker/)를 입력 할 때마다 $ ("ID_Name") .datepicker(); 호출이 실행되지 않습니다. , ./index.php ./pages/createJob.php ./pages/dealerships.phpjquery date picker가 PHP를 통해 작동하지 않습니다.
를 따라서 사용자가 인덱스를로드 첫째, 다음 createJob.php을 :
는 여기에 내가 뭘하는지입니다 그런 다음 dealerships.php를 호출합니다.
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
이
그때 dealerships.php이 있습니다 :
은 내가 index.php에의 머리에 다음과 같은 한<script>
$(document).ready(function() {
alert('foo');
$(function() {
$("#dealershipSaleStartDate").datepicker();
});
alert('bar');
});
</script>
<input id="dealershipSaleStartDate" type="text" />
페이지가로드, 나는 "foo는"을 얻을 때 알림은 표시하지만 알림은 표시하지 않습니다. 특정 파일에 명시 적으로없는 함수를 참조 할 수 있습니까? 유 JQuery와 라이브러리를 두 번 부르는 이유 ...
there..remove이 doumnet.ready 기능이 필요하지 않습니다 –
왜 jquery가 두 번 포함 되었습니까? – karthikr
내 실수 ... 나는 그 게시물을 고쳤다. – Brds