add helper function to retrieve all data-* attributes from element.
now all data attributes will be passed to socket