jQuery class selector - accessing attributes on selected element?
<p>I currently have a page that has multiple elements with the class "chained". I want to use a class selector so that I can select all of these, and run some additional code based on some data attributes (which will be different for each element). My code so far is:</p>

<pre><code>$('.chained_child').remoteChainedTo('chained_parent'
   + $(this).data('chained-parent'), $(this).data('chained-url'));
</code></pre>

<p>I believe the problem is with this part: <code>$(this).data('chained-parent')</code> - this does not appear to be working. How can I select the data attribute of the selected element?</p>

<p>Thanks!</p>
