HTML file using Jquery DataTables will load from file but not from IDE: $(...)DataTable is not a function error -


i have short test html file in include jquery plugin datatables. if open html file desktop chrome or safari or browser, works. if however, try launch file within ide (like xpages or coda), error $(...)datatable not function.

i have included jquery library first, baffled @ problem is.

the code below:

<!doctype html> <html>   <head>     <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>     <script src="https://nightly.datatables.net/js/jquery.datatables.js"></script>     <link href="https://nightly.datatables.net/css/jquery.datatables.css" rel="stylesheet" type="text/css" />   <script>     body {     font: 90%/1.45em "helvetica neue", helveticaneue, verdana, arial, helvetica, sans-serif;     margin: 0;     padding: 0;     color: #333;     background-color: #fff;         } </script>  <script>         $(document).ready( function () {   var table = $('#example').datatable(); } );        </script>      <meta charset=utf-8 />     <title>datatables - js bin</title>   </head>   <body>     <div class="container">       <table id="example" class="display nowrap" width="100%">         <thead>           <tr>             <th>name</th>             <th>position</th>             <th>office</th>             <th>age</th>             <th>start date</th>             <th>salary</th>           </tr>         </thead>          <tfoot>           <tr>             <th>name</th>             <th>position</th>             <th>office</th>             <th>age</th>             <th>start date</th>             <th>salary</th>           </tr>         </tfoot>          <tbody>           <tr>             <td>tiger nixon</td>             <td>system architect</td>             <td>edinburgh</td>             <td>61</td>             <td>2011/04/25</td>             <td>$3,120</td>           </tr>           <tr>             <td>garrett winters</td>             <td>director</td>             <td>edinburgh</td>             <td>63</td>             <td>2011/07/25</td>             <td>$5,300</td>           </tr>           <tr>             <td>ashton cox</td>             <td>technical author</td>             <td>san francisco</td>             <td>66</td>             <td>2009/01/12</td>             <td>$4,800</td>           </tr>           <tr>             <td>cedric kelly</td>             <td>javascript developer</td>             <td>edinburgh</td>             <td>22</td>             <td>2012/03/29</td>             <td>$3,600</td>           </tr>            <tr>             <td>donna snider</td>             <td>system architect</td>             <td>new york</td>             <td>27</td>             <td>2011/01/25</td>             <td>$3,120</td>           </tr>         </tbody>       </table>     </div>   </body> </html> 

please try remove body style, first, because has wrong format. in code sample:

<script>     body {     font: 90%/1.45em "helvetica neue", helveticaneue, verdana, arial, helvetica, sans-serif;     margin: 0;     padding: 0;     color: #333;     background-color: #fff;         } </script> 

the second thing see strange error message: "$(…)datatable not function" there no point symbol after $(…).


Comments