jQuery add additional value to next column in every row

I am trying to add more values to my row, but all the columns show same number.

I am trying to work with:

$this.parent().next().children('.output-value2').val((scorenetto).toFixed(2));

but it won't work. Here is the code:

http://jsfiddle.net/QjwdR/15/

the additional column "Price2 for Count in €" not working independent

just enter in "price for value" a number

$(this).parent().siblings().each(function(){
               $('.output-value2').val((scorenetto).toFixed(2));
            });

something is wrong with it, but I am not sure what it is.

Answers


Try

 $(this).closest('tr').find('.output-value2').val((scorenetto).toFixed(2));

jsfiddle: http://jsfiddle.net/QjwdR/21/

By the way: try to avoid using $(this), instead cache your result in a meanigful variable, e.g.:

$(".input-value").keyup(function() {
            var $singlePrice = $(this);
            var value = parseFloat($singlePrice.val());
            ...
});

Caching results makes your code more readable and reduces number of DOM operations. See this fiddle for inspiration: http://jsfiddle.net/QjwdR/23/


Need Your Help

how to fetch metadata of an image stored on an SD card of an android phone

android android-emulator android-sdcard

I want to know how I could fetch all the metadata associated with an image, that is stored on the SD Card of an android mobile phone.