Code example to change line background color needed

Code example to change line background color needed

tolyvvtolyvv Posts: 2Questions: 1Answers: 0

Could anyoune please help with code example .... Basicaly what is needed - the button on every line. Clicking
the button changes the entire line background color at which the button is located, for example, to green. Thanks in advance.

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    play with this http://jsbin.com/xiqiwuj/edit?html,js,output

    It generates a textbox where you enter the color for that row and click the go button and the row turns that color

    empty textbox will remove the set color

  • tolyvvtolyvv Posts: 2Questions: 1Answers: 0

    A little update on a question - the table body is generated by datatables from a JavaScript array. Including the button itself - <button OnClick='Line color change code'>Press Me For Green</button>.

  • allanallan Posts: 63,160Questions: 1Answers: 10,406 Site admin

    Happy to write the code for you. This would be covered over the priority support options.

    Alternatively use the excellent code that @bindrid has kindly provided as the basis for doing what you are looking for.

    Allan

This discussion has been closed.