3

16

@JP.ClearKey.io. I got 33% errors, can you please have a look at my code please.

document.getElementById("button").style.position="relative"; document.getElementById("button2").style.position="relative"; document.getElementById("button3").style.position="relative"; document.getElementById("button4").style.position="relative"; document.getElementById("button5").style.position="relative"; document.getElementById("button6").style.position="relative"; document.getElementById("button7").style.position="relative"; var buttonPosition = $("#button").position(); var buttonPosition2 = $("#button2").position(); var buttonPosition3 = $("#button3").position(); var buttonPosition4 = $("#button4").position(); var buttonPosition5 = $("#button5").position(); var buttonPosition6 = $("#button6").position(); var buttonPosition7 = $("#button7").position(); var buttonHeight = buttonPosition.top; var buttonHeight2 = buttonPosition2.top; var buttonHeight3 = buttonPosition3.top; var buttonHeight4 = buttonPosition4.top; var buttonHeight5 = buttonPosition5.top; var buttonHeight6 = buttonPosition6.top; var buttonHeight7 = buttonPosition7.top; var menuTextHeight = buttonPosition.top + $("#button").height(); var menuTextHeight2 = buttonPosition2.top + $("#button2").height(); var menuTextHeight3 = buttonPosition3.top + $("#button3").height(); var menuTextHeight4 = buttonPosition4.top + $("#button4").height(); var menuTextHeight5 = buttonPosition5.top + $("#button5").height(); var menuTextHeight6 = buttonPosition6.top + $("#button6").height(); var menuTextHeight7 = buttonPosition7.top + $("#button7").height(); //finds the center position of the button in the window to move the dropdown menu under it. var buttonLeft = buttonPosition.left; var buttonLeft2 = buttonPosition2.left; var buttonLeft3 = buttonPosition3.left; var buttonLeft4 = buttonPosition4.left; var buttonLeft5 = buttonPosition5.left; var buttonLeft6 = buttonPosition6.left; var buttonLeft7 = buttonPosition7.left; var title_2Height = $("#title_1").height(); var title_3Height = $("#title_3").height() + $("#title_2").height(); var title_4Height = $("#title_4").height() + $("#title_3").height() + $("#title_2").height(); var title_5Height = $("#title_5").height() + $("#title_4").height() + $("#title_3").height() + $("#title_2").height(); var title_6Height = $("#title_6").height() + $("#title_5").height() + $("#title_4").height() + $("#title_3").height() + $("#title_2").height(); var title_7Height = $("#title_7").height() + $("#title_6").height() + $("#title_5").height() + $("#title_4").height() + $("#title_3").height() + $("#title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height2 = $("#2title_1").height(); var title_3Height2 = $("#2title_3").height() + $("#2title_2").height(); var title_4Height2 = $("#2title_4").height() + $("#2title_3").height() + $("#2title_2").height(); var title_5Height2 = $("#2title_5").height() + $("#2title_4").height() + $("#2title_3").height() + $("#2title_2").height(); var title_6Height2 = $("#2title_6").height() + $("#2title_5").height() + $("#2title_4").height() + $("#2title_3").height() + $("#2title_2").height(); var title_7Height2 = $("#2title_7").height() + $("#2title_6").height() + $("#2title_5").height() + $("#2title_4").height() + $("#2title_3").height() + $("#2title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height3 = $("#3title_1").height(); var title_3Height3 = $("#3title_3").height() + $("#3title_2").height(); var title_4Height3 = $("#3title_4").height() + $("#3title_3").height() + $("#3title_2").height(); var title_5Height3 = $("#3title_5").height() + $("#3title_4").height() + $("#3title_3").height() + $("#3title_2").height(); var title_6Height3 = $("#3title_6").height() + $("#3title_5").height() + $("#3title_4").height() + $("#3title_3").height() + $("#3title_2").height(); var title_7Height3 = $("#3title_7").height() + $("#3title_6").height() + $("#3title_5").height() + $("#3title_4").height() + $("#3title_3").height() + $("#3title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height4 = $("#4title_1").height(); var title_3Height4 = $("#4title_3").height() + $("#4title_2").height(); var title_4Height4 = $("#4title_4").height() + $("#4title_3").height() + $("#4title_2").height(); var title_5Height4 = $("#4title_5").height() + $("#4title_4").height() + $("#4title_3").height() + $("#4title_2").height(); var title_6Height4 = $("#4title_6").height() + $("#4title_5").height() + $("#4title_4").height() + $("#4title_3").height() + $("#4title_2").height(); var title_7Height4 = $("#4title_7").height() + $("#4title_6").height() + $("#4title_5").height() + $("#4title_4").height() + $("#4title_3").height() + $("#4title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height5 = $("#5title_1").height(); var title_3Height5 = $("#5title_3").height() + $("#5title_2").height(); var title_4Height5 = $("#5title_4").height() + $("#5title_3").height() + $("#5title_2").height(); var title_5Height5 = $("#5title_5").height() + $("#5title_4").height() + $("#5title_3").height() + $("#5title_2").height(); var title_6Height5 = $("#5title_6").height() + $("#5title_5").height() + $("#5title_4").height() + $("#5title_3").height() + $("#5title_2").height(); var title_7Height5 = $("#5title_7").height() + $("#5title_6").height() + $("#5title_5").height() + $("#5title_4").height() + $("#5title_3").height() + $("#5title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height6 = $("#6title_1").height(); var title_3Height6 = $("#6title_3").height() + $("#6title_2").height(); var title_4Height6 = $("#6title_4").height() + $("#6title_3").height() + $("#6title_2").height(); var title_5Height6 = $("#6title_5").height() + $("#6title_4").height() + $("#6title_3").height() + $("#6title_2").height(); var title_6Height6 = $("#6title_6").height() + $("#6title_5").height() + $("#6title_4").height() + $("#6title_3").height() + $("#6title_2").height(); var title_7Height6 = $("#6title_7").height() + $("#6title_6").height() + $("#6title_5").height() + $("#6title_4").height() + $("#6title_3").height() + $("#6title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; var title_2Height7 = $("#7title_1").height(); var title_3Height7 = $("#7title_3").height() + $("#7title_2").height(); var title_4Height7 = $("#7title_4").height() + $("#7title_3").height() + $("#7title_2").height(); var title_5Height7 = $("#7title_5").height() + $("#7title_4").height() + $("#7title_3").height() + $("#7title_2").height(); var title_6Height7 = $("#7title_6").height() + $("#7title_5").height() + $("#7title_4").height() + $("#7title_3").height() + $("#7title_2").height(); var title_7Height7 = $("#7title_7").height() + $("#7title_6").height() + $("#7title_5").height() + $("#7title_4").height() + $("#7title_3").height() + $("#7title_2").height(); //for a list longer than 4 items you have to use //5th item example //var title_(n)Height(x) = $("#(x)title_(n)").height() + $("#(x)title_(n-1)").height(); + $(#(x)title_(n-2).height() + $("#(x)title_(n-3)").height(); //each extra Item added in length of the list add the following to THE END of the equation above. //ill call each extra item (y) add the code " + $("#(x)title_((y)-((y)-2)")" and be sure to end in a ; //below: title_1 for some reason did not want to adjust like elements n+1 and up. So I created its own adjustment based on the correct postioning of the second Element in the Grouped Menu Field. var title_1 = menuTextHeight; var title_2 = menuTextHeight + title_2Height; var title_3 = menuTextHeight + title_3Height; var title_4 = menuTextHeight + title_4Height; var title_5 = menuTextHeight + title_5Height; var title_6 = menuTextHeight + title_6Height; var title_7 = menuTextHeight + title_7Height; //the first is always the exception to the rule and normal iteration does not require the Iteration Identifer (x) when used in examples //var title_5 = $("#title_1").height() - (title_2 - title_1); //code for dynamic button menu //each addtional item follows the same creationg pattern //var title_(n)_(x) = menuTextHeight(x) + title_(n)Height(x); var title_1_2 = menuTextHeight2; var title_2_2 = menuTextHeight2 + title_2Height2; var title_3_2 = menuTextHeight2 + title_3Height2; var title_4_2 = menuTextHeight2 + title_4Height2; var title_5_2 = menuTextHeight2 + title_5Height2; var title_6_2 = menuTextHeight2 + title_6Height2; var title_7_2 = menuTextHeight2 + title_7Height2; var title_1_3 = menuTextHeight3; var title_2_3 = menuTextHeight3 + title_2Height3; var title_3_3 = menuTextHeight3 + title_3Height3; var title_4_3 = menuTextHeight3 + title_4Height3; var title_5_3 = menuTextHeight3 + title_5Height3; var title_6_3 = menuTextHeight3 + title_6Height3; var title_7_3 = menuTextHeight3 + title_7Height3; var title_1_4 = menuTextHeight4; var title_2_4 = menuTextHeight4 + title_2Height4; var title_3_4 = menuTextHeight4 + title_3Height4; var title_4_4 = menuTextHeight4 + title_4Height4; var title_5_4 = menuTextHeight4 + title_5Height4; var title_6_4 = menuTextHeight4 + title_6Height4; var title_7_4 = menuTextHeight4 + title_7Height4; var title_1_5 = menuTextHeight5; var title_2_5 = menuTextHeight5 + title_2Height5; var title_3_5 = menuTextHeight5 + title_3Height5; var title_4_5 = menuTextHeight5 + title_4Height5; var title_5_5 = menuTextHeight5 + title_5Height5; var title_6_5 = menuTextHeight5 + title_6Height5; var title_7_5 = menuTextHeight5 + title_7Height5;