Can I replace .attr("data"... with .data(" ...
<p>I have the following:</p>

<pre><code>        if ($(this).attr("data-disabled") === "false") {
            var $link = $(this);
            $("a.accessLink").each(function () {
                $(this).attr("data-disabled", "true");
            });
            dialog($link);
        }
</code></pre>

<p>Am I correct in saying this could be replaced with:</p>

<pre><code>        if ($(this).data("disabled") === "false") {
            var $link = $(this);
            $("a.accessLink").each(function () {
                $(this).data("disabled", "true");
            });
            dialog($link);
        }
</code></pre>

<p>Also is there a better way for me to set all the data-disabled attributes of links with the accessLink class to a value of "disabled"?</p>
