javascript - TypeError: Cannot read property 'top' of undefined -


I am getting this error: 'Unkit type error: undefined' top 'can not read property' Does anyone Do you know what I'm doing wrong? I have only one end with two different values, but they do not execute, executes the first loop, but there is no rest. I'm new to jQuery so if someone can tell me what I'm doing then it would be nice. That would be pretty cool.

 for  (i = 4, x = 1; x & lt; 16; i = 3 + x, x = x + 3) {var top = $ ('. Box-' +). Event (). Top + $ ('. Box-' + x). Height () + 10; Var left = $ ('. Box-' + x). Position (). Left; $ ('. Box-' + i). Css ({top: up, left: left}); }  

I continue this error: 'Unkot type error:' can not read the 'top' property of the undefined property. As mentioned by @dfsq, some elements may not be available on the target page as

. Therefore, the following codes will only work on those:

 for  (i = 4, x = 1; x  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -