jquery check html5 data value
<p>How would I check what value a data attribute has? e.g.</p>

<pre><code>&lt;form data-after="closemodal"&gt;

&lt;form data-after="refreshmodal"&gt;
</code></pre>

<p>I've tried doing it with:</p>

<pre><code>if (form.data('after', 'closemodal'))
{
// close modal
}
else if (form.data('after', 'refreshmodal'))
{
// refresh modal
}
</code></pre>

<p>By the way <code>form</code> is a variable that stores the current form we are talking to</p>

<p>But it doesn't work? Any ideas? Thanks</p>
