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:
$('.chained_child').remoteChainedTo('chained_parent'
+ $(this).data('chained-parent'), $(this).data('chained-url'));
I believe the problem is with this part: $(this).data('chained-parent')
- this does not appear to be working. How can I select the data attribute of the selected element?
Thanks!