Table Captions

Table Captions

artanorartanor Posts: 1Questions: 0Answers: 0
edited August 2011 in General
Hi, just recently started using JQuery and JQuery UI and when i needed a table to support themes I found Datatables and so far its all looking great. i have 1 niggle though. Table captions dont look very nice!

I added a couple of classes to get them themed with a bit of JQuery

[code]
$("caption").addClass("fg-toolbar ui-widget-header");
[/code]

which looks ok but I find that because the caption in no longer at the top of the table it makes it tricky to spot. Is it possibe to hide the original caption and either incorporate the caption text into the toolbar (where the filter is etc) or in a new element at the top of the table ?

Thanks
Andrew

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I'm not familiar with captions (assuming it's a J UI thing). But I think you could use the sDom to add arbitrary divs onto the page, or use the various Info elements to provide custom messages.

    [code]
    "sDom": '<"H"lfr><'#mycaption'>t<"F"ip>';
    [/code]

    or search sInfo and sInfoPostFix on http://www.datatables.net/ref
This discussion has been closed.