![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 93 Pomógł: 7 Dołączył: 6.09.2011 Skąd: Olsztyn Ostrzeżenie: (0%) ![]() ![]() |
Witam, otóż mam pewien problem, a mianowicie. Po wywołaniu w konsoli kodu:
Kod $('body').data(); dostaję coś takiego: Kod Object {averageData: Object} averageData: Object 8: Object average: 3.599 documents: Array[2] 0: Object 1: Object length: 2 __proto__: Array[0] selector: x.fn.x.init[1] __proto__: Object 9: Object average: 3.648 documents: Array[2] 0: Object 1: Object length: 2 __proto__: Array[0] selector: x.fn.x.init[1] __proto__: Object __proto__: Object __proto__: Object Problem polega na tym, że w momencie wywołania takiej linii: Kod $('body').data('average-data')[studentId]['documents'].splice(removeIndex, 0); podstawiając za studentId = 8, a pod removeIndex np 0, usuwany jest index=0 zarówno z tablicy o indexie 8 jak i o indexie 9... Czy ktoś z Was może mi powiedzieć co robię nie tak? Z góry dziękuję |
|
|
![]() ![]() |
![]() |
Aktualny czas: 30.09.2025 - 13:48 |