Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Questions related to customising nuBuilder Forte with JavaScript or PHP.
kknm
Posts: 377 Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:
Unread post
by kknm » Fri May 29, 2020 12:19 pm
Understood! All OK !
The problem is in the line:
Code: Select all
if (a.val() == 1) {//was if (a == '1')
kev1n
nuBuilder Team
Posts: 4562 Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:
Unread post
by kev1n » Fri May 29, 2020 1:32 pm
Meaningful variable names help to make code more readable and easier to understand.
E.g. like this:
Code: Select all
var beg = $("#" + prefix + "pro_beg");
var end = $("#" + prefix + "pro_end");
var diff1 = $("#" + prefix + "pro_dif");
var diff2 = $("#" + prefix + "pro_diff");
var devNum = $("#" + prefix + "pro_num");
kknm
Posts: 377 Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:
Unread post
by kknm » Fri May 29, 2020 2:13 pm
kev1n wrote: Meaningful variable names help to make code more readable and easier to understand.
Early rejoiced, Counts only the first line. - fixed.
I need to display the sum of the differences for each device