I have a span element that I want to switch between the words "Price" and "No", onclick another element.
Essentially, you need to check the existing contents of the cells to see what is currently present, and then replace it with another.
Something like that:
<input type = "checkbox" name = "element1" onclick = "$(#element2).toggleHTML('Price', 'Net')"> <span id="element2">Price</span>
I compiled the toggleHTML method used above to show how I expect it to work.
source share