Is it possible to write an html attribute that will store the name of a javascript function and then extract that val() and execute that function? Example:
<button id=example data-function-name=showAllElements()>
and then in js/jq
fn = $('#example').data('function-name');
fn;