Nor newbie and nor advanced apex user here,  

But,  

 I'm very naive on major client side web languages, and now I need to face it. And soon.  

I have an example [here](https://apex.oracle.com/pls/apex/f?p=149232:6) - user : *test* and password *test*.
I'm based on the very same jquery and javascript function from [here](https://stackoverflow.com/questions/36003828/dynamically-changing-the-apex-item-text-value-in-oracle-apex), answered by Mr. Tony Andrews.
 At my app example, when the *priority* field is changed it puts in the value of ***A* field**, when its not 0, nor null . Its simply multiply the result in that field.  

I'm trying to put a change priority script from priority field when its change. For example: When would change the priority of *id=1*, to 1, the priority from *id=2* must be changed to *3* - the original priority from *id=1*.   
I know it's a very basic algorithm, but I don't know how to do it just in time, on javascript or jQuery calls on apex. I'm been trying to more complex manipulations on report, but I need to understand the basics first.

For clarification my query report and javascript execution is: 

```
select distinct
apex_item.checkbox2(10,r.ID) ID,
apex_item.text(11,r.ID) ID_2,
apex_item.text(20,r.PRIORIDADE) PRIORITY,
apex_item.text(30,1) a,
apex_item.SELECT_LIST_FROM_LOV(31,r.PRIORIDADE,'LISTAPRIORIDADES',NULL,'NO') PRIORITY_LOV, 
apex_item.text(40,null) b,

(select seq_id from apex_collections c  where collection_name = 'COLECAO'  AND c001 = r.id
)sequencial
from REPRIORIZA r

order by id;    
     //javascript execution, on dynamic action:

    var target = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f30"]')
    console.log(target)
    var source = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f20"]')
    console.log(source)
    var result = target.val() * source.val();
    target.val(result);
    console.log(target)

        var target2 = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f40"]')
        console.log(target)
        var source2 = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f11"]')
        console.log(source2)
        var result2 = source2.val();
        target2.val(result2);

```

Regards,