2015-09-18 86 views
0

我想創建一個日期選擇器Zebra Datepicker jQuery插件。Zebra Datepicker - 不工作

我已經是 -

<html> 
    <head> 
    <link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> 

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css"> 
    <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> 

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.0.3/css/buttons.dataTables.min.css"> 
    <script type="text/javascript" language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 
     <script type="text/javascript" language="javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> 

     <!-- This 2 for jQuery UI --> 
     <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script> 
     <script type="text/javascript" language="javascript" src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> 

     <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/dataTables.buttons.min.js"></script> 
     <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/buttons.colVis.min.js"></script> 

<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/stefangabos/Zebra_Datepicker/master/public/css/bootstrap.css"> 

<script type="text/javascript" language="javascript" src="https://raw.githubusercontent.com/stefangabos/Zebra_Datepicker/master/public/javascript/zebra_datepicker.src.js"></script> 

    </head> 
    <body> 
     <input type="text" id="#datepicker-example1" name="anything" value="nai" placeholder="datepicker"> 
    </body> 

    <script> 
      $(document).ready(function() 
      { 
       $('#datepicker-example1').Zebra_DatePicker(); 
      }); 
    </script> 

</html> 

做,但它無法正常工作。

任何人都可以幫忙嗎?

+0

嘗試下載.js和.css文件。不要使用Git – Mate

回答

1

請確保您包含創作者網站上所述的<doctype>

http://stefangabos.ro/jquery/zebra-datepicker/

Zebra_Datepicker沒有比jQuery的其他依賴1.5.2+但 要求你的頁面上使用的插件有嚴格的 DOCTYPE,如:

<!doctype html>

此外,不是試圖從git遠程獲取腳本,而是在本地下載它們。

Git不是CDN,我懷疑你的請求被拒絕。