converted JSON.parse(.attr()) to .data(). Thanks arhayward.