Trouble with css on dynamic table loading

Trouble with css on dynamic table loading

mkebaypl2mkebaypl2 Posts: 1Questions: 0Answers: 0
edited January 2014 in DataTables 1.9
I have trouble getting table displayed correctly when loading html table dynamically like this:

[code]


mytable











$( document ).ready(function() {
$.get("http://" + location.hostname + ":5556/mytable.html", function(data) {
$("body").append(data);
var table = $("#mytable").DataTable();
});

});



[/code]

*Some* CSS is being applied because I see lightblue-white alternating background in rows. Everything else, however, is not used (although Javascript works, e.g. Prev or Next buttons, search, sorting by columns, etc).

What's the problem here? After all I wait until document is read, that is, CSS should be loaded, no?
This discussion has been closed.