Thanks, so it is not possible to add these attributes using the jquery xxx.data() method so that they are not part of the visible html source code ?
I am trying to achieve this without converting the object to a string and embedding it inside the element's inner html.
I have used a different method:
http://jsfiddle.net/54v8nacp/38/