Javascript – Get Data Attribute

By Forrest Smith - Drempd.com

Get a data attribute from an html tag (in this case, something like data-output='test'):
output = e.srcElement.getAttribute("data-output");