I am trying to update the value attribute of a button inside a table cell.
I iterate through each cell, and my code looks like this:
for (var i = 0, cell; cell = table.cells[i]; i++) { $(cell).find('.btn btn-default').val("new value"); }
But that does not work.
My cell looks like this:
<div class=\"list-element\"> <a class=\"glyphicon glyphicon-link\" href=\"www.somelink\"></a> <input class=\"btn btn-default\" type=\"button\" value=\"some stuff\"> <label class=\"label label-success\">stuff</label> </div>
So, I want to change "some things."
Any help would be greatly appreciated.
source share