Change css of a field
Change css of a field
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: I need to change the css for an editor field via jquery. If I use this it won't thrown an error:
editor2.field('Mytable.Reference').addClass('tfBoldLabel');
How can I achieve this? Thanks.
Answers
These methods do not work either:
editor2.field('Mytable.Reference').attr("style", {'font-weight': 'bold'});
or,
$('#DTE_Field_Mytable.Reference').attr("style", {backgroundColor:"red"});
or,
var p = document.getElementById('DTE_Field_Mytable.Reference');
p.appendChild(document.createElement('b'));
p = null;
I think you will want to use
field().node()
. See Allan's response in this thread.Kevin
Many thanks for this