jQuery -change from class to custom attribute
<p>I an trying to change a plug in from being based on anchor classes to being based on a custom attribute.</p>

<p>so from: a.categoryname</p>

<p>to: a data-category="categoryname"</p>

<p>The plug in I am customising is:
<a href="http://www.designchemical.com/blog/index.php/jquery/create-an-automatic-content-filter-using-jquery-css-classes/" rel="nofollow">http://www.designchemical.com/blog/index.php/jquery/create-an-automatic-content-filter-using-jquery-css-classes/</a></p>

<p>I won't post all the code here as I am almost there but but am having a problem with this line:</p>

<pre><code>$("#demo-list li a."+getText).fadeIn();
</code></pre>

<p>instead of fading in #demo-list li a."getText), I want it to fade in #demo-list li a, whose attribute "category-name" is "getText"</p>

<p>Here is my horrendous attempt...</p>

<pre><code>$("#demo-list li a).attr("data-category").val(getText).fadeIn();
</code></pre>

<p>Needless to say it doesn't work... I know enough to know the syntax is not right but not enough to fix it...</p>

<p>Can anyone help me out here please?</p>

<p>thanks</p>
