CSS class wrapping questions
CSS class wrapping questions
Greetings,
I have a few questions about the CSS classes injected into the page by DataTables. I am referring to the default use, with no JQuery UI.
1. What is the rationale for having .datatables_wrapper wrap the Length and Filter area, along with the , but not the Info and Paginate areas?
2. Is there a supported method (css class) for injecting a wrapper for the Length and Filter areas, that is a child of .datatables_wrapper?
Analyzing the JQ UI sample, I see the desired DIV but it is assigned what I presume to be JQ UI classes. For various reasons I cannot add JQ UI to this project.
3. Ditto #2 for the Info and Paginate areas.
Many thanks for listening (I tried searching on this but the search is not optimal...) and for the great work you've put in on this script.
Regards,
- Kevin M.
I have a few questions about the CSS classes injected into the page by DataTables. I am referring to the default use, with no JQuery UI.
1. What is the rationale for having .datatables_wrapper wrap the Length and Filter area, along with the , but not the Info and Paginate areas?
2. Is there a supported method (css class) for injecting a wrapper for the Length and Filter areas, that is a child of .datatables_wrapper?
Analyzing the JQ UI sample, I see the desired DIV but it is assigned what I presume to be JQ UI classes. For various reasons I cannot add JQ UI to this project.
3. Ditto #2 for the Info and Paginate areas.
Many thanks for listening (I tried searching on this but the search is not optimal...) and for the great work you've put in on this script.
Regards,
- Kevin M.
This discussion has been closed.
Replies
It should be that all elements that DataTables' generates are put into the wrapper. Looking at this example, http://datatables.net/examples/basic_init/zero_config.html , and at the DOM in Inspector, I can see that that is the case. Could you point me to an example where that doesn't hold true?
Thanks,
Allan
I agree completely with your remark, but I wasn't very clear in my question.
Here is a link to an image that (I hope) better illustrates what I am talking about.
If I am correct in understanding the wrapper DIV injection of the script, there is an inconsistency in injection behavior depending on the value of the jQuery UI setting.
BTW, I can get what I need by running with the jQuery UI setting assigned 'true', but it introduces many unneeded classes. Maybe that makes this point moot.
Anyway, have a quick look: http://www.netais.com/datatables/divs.htm
Regards,
- Kevin M.
The default for normal operation is "lfrtip". When the jQuery UI option is enabled it is '<"H"lfr>t<"F"ip>'. The H and the F are the ones which inject the div classes, and the angle brackets put in the extra divs. If you don't want jQuery UI display at all, but do want the divs, just use sDom to manipulate the DOM DataTables creates as you need.
Allan
I figured you had worked this out.
Thanks again, Allan.