Change color of cell after edit

Change color of cell after edit

mikelucksmikelucks Posts: 14Questions: 2Answers: 0

I would like to change the color of a cell after it has been edited. There is a similar question already posted in the Forums, but I can't make sense of the answer. Can anyone please post a simple example of how to do this?

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Im assuming this is editor youre using? Or somebother plugin

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0
    edited October 2015

    Yes, the Datatables Editor.

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0
    edited October 2015

    Still hoping for some advice on this. Is it possible to do it using the DataTables Editor -- or is an external plugin (e.g. JEditable) required?

  • BoltBaitBoltBait Posts: 19Questions: 4Answers: 0
    edited October 2015

    How about something like this...

    <table border=1 bordercolor=black cellspacing=0 cellpadding=4>
    <tr>
    <td><input type="text" onchange="$(this).closest('td').addClass('changed');"/></td>
    </tr>
    </table>
    
    <style>
    td.changed {
        background-color: yellow !important;
    }
    </style>
    
    

    Hope this helps!

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0

    That looks promising -- I'll give it a try. Thanks!

This discussion has been closed.