jQuery .val Enigma between two input boxes

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2012-03-19T23:27:05Z Indexed on 2012/03/19 23:29 UTC
Read the original article Hit count: 288

I'm trying to get it so that if I move a red div-square around the screen using jQuery UI and jQuery, then an input field updates with the position of the div. I got that working with a simple .val. But, it's hard to explain why, but I need to make it so that when I move the square, it updates my input box, and when the input box value is changed, another input box reflects the new value of the old input box. Do I make any sense, coz I'm confusing myself :). I made a jsfiddle, so perhaps it'll make more sense there.

If you move the red square, then the input box directly above it updates, but the input box above that does not, even though it is programmed to reflect the value of the input box below itself.

P.S. Is this specific to only jQuery, or is this problem present in all of JavaScript.

Thanks!

http://jsfiddle.net/xmCsq/27/

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery