jQuery and Rails :collection
Hello,
I have a RoR partial that generates a block of HTML for every record in the collection. Each block is constructed with identical markup. I have a hidden div that does the show() hide() thing. My problem is every instance on the carries the same id's and classes, so when I click to show 1, it shows all.
jQuery(document).ready(function() {
jQuery('#user_box').each(function(index) {
jQuery('#member_wrap').toggle(function() {
jQuery('.member_meta').hide('slow');
},
function() {
jQuery('.member_meta').show('slow');
});
});
});
Is there a way to append something to make each instance of #user_box unique so the FX only trigger the instance clicked?
any help would be great.