Is there any specification for "Pass database variables to jQuery via element attribute?"
I've been doing this for a long time:
<script>
var status = <%= status %>;
</script>
I would much rather do something like this:
<variable data-name="status" data-value="<%= status %>" />
Then get it with jquery:
var status = $('variable[data-name="status"]').attr("data-value");
I would need the element to be hidden from displaying. I know there is a pattern for this, I just don't know what it's called or how to search it.