Easiest way of changing value of input fields in a DOM Table?

Easiest way of changing value of input fields in a DOM Table?

giorgio79giorgio79 Posts: 43Questions: 0Answers: 0
edited September 2010 in General
I know the ids of these fields so I can do it with plain jquery.

But been wandering if there is a way to do it with datatables, since after sorting the order of fields change, and I would like to update the first row for example all the time.

I checked fnupdate but that is meant for the entire row, including field strings.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Assuming that the elements are visible that you want to alter, just use the normal jQuery methods that you would do. If they aren't visible, then use fnGetNodes() to get an array of all TR elements, and put a jQuery selector on that (i.e. $('#whatever', oTable.fnGetNodes())...)

    Allan
  • giorgio79giorgio79 Posts: 43Questions: 0Answers: 0
    Thanks Allan, will be checking it out :)
This discussion has been closed.