Find image change source
Find image change source
Wotikar
Posts: 1Questions: 1Answers: 0
Probably asked multiple times but i can't figure it out.
I wan't to find a image in a cell and change its source when there is clicked on a button outside the datatable. The row with the cell containing the image varies.
var table = $('#TblPos').DataTable();
var rows = table.rows();
rows.each(function (value, index) {
var cell = rows.cells(index);
var img = $(cell).find('#Img+cll.data());
});
This discussion has been closed.
Answers
Hi @Wotikar ,
You can change (and retrieve) the data for a cell with
cell().data()
- you could do this in the click event handler for the button.Cheers,
Colin