I'm saving key-value pairs in div container by using:
$( '#div_id').data( key, value);
At the end I need to check if anything is stored in this div container.
So first I get the content by calling:
var data = $( '#div_id').data();
Then to check its size with data.length or data.size.
But both functions don't exists. As I know the data function in jquery returns an object, so I should be able to get the size of this object.
How do I get the size of the object returned by the data function in jquery?