SyntaxFix
Write A Post
Hire A Developer
Questions
You can simply use
$(this).prev().val("hello world");
JSFiddle Demo