debugging use of attr and jquery selectors

addressing the problem of .attr('value') reads the
original value, not the present state