I'm trying to get the ID of a widget container when it gets resized. I added an .attr call to the serialize_params function and it worked for a while. It returned [{"element_id":"admin_stats","col":7,"row":3,"size_x":6,"size_y":4}]. But now it's sending weird data back to the resize.stop function.
The error shown in the console is:
Uncaught SyntaxError: Unexpected token o in JSON at position 1
If I display the results of JSON.stringify($widget), it contains:
{"0":{"jQuery11240030910348659392684":192,"sizzle1505230551480":{"undefined":{"parentNode":[19,14,true]}}},"length":1,"prevObject":{"0":{},"context":{},"length":1},"context":{}}
I'm trying to get the ID of a widget container when it gets resized. I added an .attr call to the serialize_params function and it worked for a while. It returned
[{"element_id":"admin_stats","col":7,"row":3,"size_x":6,"size_y":4}]
. But now it's sending weird data back to the resize.stop function.Gridster Code:
The error shown in the console is:
Uncaught SyntaxError: Unexpected token o in JSON at position 1
If I display the results of
JSON.stringify($widget)
, it contains:{"0":{"jQuery11240030910348659392684":192,"sizzle1505230551480":{"undefined":{"parentNode":[19,14,true]}}},"length":1,"prevObject":{"0":{},"context":{},"length":1},"context":{}}
What is happening and how do I fix it?