Initializing and Styling DataTables

Initializing and Styling DataTables

Duac246Duac246 Posts: 10Questions: 0Answers: 0
edited September 2010 in General
Hello All,

A newbie here. I wanted to start off by saying--what a great site and a great product! A bit off topic, but does anyone know the font used in the site?

For someone like me, new to web programming, jQuery plugins are a bit intimiadating to use. I have scoured the net, and have come up with code that I think should work, but failing at both the stylistic and functional level. Here is my code layout:
1) A table represented by table.html that has the following code:
[code]






$(document).ready(function() {
$('.tablesorter').dataTable();

});





[/code]
Which then goes on to create a HTML table as per the DataTable requirements, containing and tags, as well as tags for the header row.
2) A file called demo-table.css from the latest build.
3) A folder called "images" at the same level. I made sure to make all url references in the .css file mentioned above
[code]
background-image: url('/images/back_disabled.jpg');
[/code]
instead of
[code]
background-image: url('../images/back_disabled.jpg');
[/code]
to make sure it could access the "images" folder.

Yet I don't see the styling--and without the arrows and the pagination styling, I can't tell if the jQuery plugin itself works! I cannot find any javascript errors from the CGI error log. Do you have an idea what I could be doing wrong / ignoring all-together? Thanks!

Replies

  • allanallan Posts: 63,302Questions: 1Answers: 10,431 Site admin
    Hi Duac246,

    The font-family for the site is: 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;

    Regarding your problem with styling - if there is a text box added above the table for filtering (DataTables adds it by default), then the plug-in itself is running fine. Otherwise, it is likely that one or more of the paths for the include files is wrong. If you install Firebug and look at the console, do you get any error messages (Javascript errors wouldn't show up in a web-server's log)?

    Do you have a link you can give us, which might make tracking down the path issues easier. Also look in your server error log for 404 errors.

    Allan
  • Duac246Duac246 Posts: 10Questions: 0Answers: 0
    Thanks for your comments. I have solved my initialization problem--through FireBug reports, I found that I had th tags in the tbody, which I didn't know was a problem until FireBug told me it was.
This discussion has been closed.