not sure I follow, why dont use a data-attribute instead of dynamic generated js ?