Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
QuakeLive

Simple Problem With "js/jquery.datatables.min.js" (Datatables Plug-In)

Recommended Posts

Hi,

 

In chapter 13 there is an example of using the DataTables plugin - in folder ch13 there is table.html.

 

In that .html file there is: <script src="js/jquery.dataTables.min.js"></script>, but in js folder there is no that file. So, I downloaded the DataTables from http://datatables.net/download/, and in folder DataTables-1.10.0\media\js there is that file, so I just copied it (jquery.dataTables.min.js) to js folder of that example (ch13\js), but it doesn't work again :/

 

Do you know what could be the problem?

 

Also, I have another question - according to the documentation: http://datatables.net/manual/installation - to use DataTables we need to include DataTables on your page using the following HTML:

 

<!-- DataTables CSS -->
<link rel="stylesheet" type="text/css" href="/DataTables-1.10.0/css/jquery.dataTables.css">
 
<!-- jQuery -->
<script type="text/javascript" charset="utf8" src="/DataTables-1.10.0/js/jquery.js"></script>
 
<!-- DataTables -->
<script type="text/javascript" charset="utf8" src="/DataTables-1.10.0/js/jquery.dataTables.js"></script>

 

But in the example tables.html (ch13) there CSS included is:

 

<link rel="stylesheet" href="css/demo_table_jui.css">

 

 

and JavaScript included:

 

 

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="js/jquery.dataTables.min.js"></script>

 

... which is different than in the documentation. Does this mean that I do not need to include CSS file jquery.dataTables.css as in documentation?

 

 

EDIT: I also tested version of table.html with includes as it is explained in the documentation, but it still doesn't work :/

Share this post


Link to post
Share on other sites

The CSS file will simply "pretty up" stuff, and likely not affect the functionality.

With that said, pull open your browser console and look for any errors that might be getting output.

Likely, your either aren't putting the file(s) in the right place, or you are not correctly referencing the objects/functions in the library.

 

Without more info, it's hard to help though.

Thanks.

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi HartleySan,

 

Sorry for the late reply. I was looking at code and I can't find what is the problem. I will upload original files from ch13 (also available here), and the same files but with added jquery.dataTables.min.js in js directory.

 

1. Original (from larryullman.com & wihtout jquery.dataTables.min.js in js directory) - http://download1348.mediafire.com/k8eh0h0n78wg/hpe52nx7c4d52qp/ch13.zip

 

2. With jquery.dataTables.min.js in js directory - http://download1072.mediafire.com/2rr2ohn9d3jg/0890rotur5egm89/withJS.zip

 

This is not an emergency, when you have a lot of free time and will - you can check this  :)  And, sorry for my bad English.

Thanks.

Share this post


Link to post
Share on other sites

Quake, sorry, but you didn't read/understand my post at all.

Please go to the page with the error yourself, and open the browser console.

Please try to debug from there yourself.

 

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...