I find that when I am trying to target an element in a jQuery Dialog, I must do something like
$("#elemInDialog", this).val()
^
I found that this only occurs in my simple code seen http://jiewmeng.kodingen.com/test/jquery-autocomplete.html or http://jsfiddle.net/28GMT/ (in jsFiddle or jsbin, the auto complete doesn't wor开发者_C百科k even, but it works in my hosted version) what did I do wrong?
You have at least one typo in there:
This line:
$("#txtArea").val( $("#txtArea").val() + "\n" + $("#txtUrl").val() );
should be:
$("#txtArea").val( $("#txtArea").val() + "\n" + $("#txtURL").val() );
With that fix, things seem to work okay for me, as far as I can tell?
精彩评论