Pass database variables to jQuery via element attribute?
<p>Is there any specification for "Pass database variables to jQuery via element attribute?"</p>

<p>I've been doing this for a long time:</p>

<pre><code>&lt;script&gt;
   var status = &lt;%= status %&gt;;
&lt;/script&gt;
</code></pre>

<p>I would much rather do something like this:</p>

<pre><code>&lt;variable data-name="status" data-value="&lt;%= status %&gt;" /&gt;
</code></pre>

<p>Then get it with jquery:</p>

<pre><code>var status = $('variable[data-name="status"]').attr("data-value");
</code></pre>

<p>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.</p>
