Swapped from data attributes to standard attr call to fix undefined bug