Change css of a field

Change css of a field

dynasoftdynasoft Posts: 446Questions: 69Answers: 3

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

  • dynasoftdynasoft Posts: 446Questions: 69Answers: 3

    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;

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    I think you will want to use field().node(). See Allan's response in this thread.

    Kevin

  • dynasoftdynasoft Posts: 446Questions: 69Answers: 3

    Many thanks for this

Sign In or Register to comment.