September 15, 201214 yr Heya, Before anyone says anything: I have to use MooTools. So basically I have a few rows in a table that have been outputted from a database. In each of these rows there is an link, which should make a div/row appear below the row link that they clicked on. I have this working for the very first row, however I need it to be working so each row has a seperate slide down part to it. Simplified code: <tr> <td><a id='v_toggle' href='#'>Toggle</a></td> </tr> <tr id='vertical_slide'> <td>Toggled content</td> </tr> The MooTools/JS: <script language="Javascript" type="text/javascript"> window.addEvent('domready', function() { // -- horizontal var myVerticalSlide = new Fx.Slide('vertical_slide', {mode: 'vertical'}); myVerticalSlide.hide(); $('v_toggle').addEvent('click', function(event){ event.stop(); myVerticalSlide.toggle(); }); }); </script> That works for the very first row, but as said, I would like it to work for each I assume there needs to be some kind of "this" word put in somewhere (like jQuery).
Create an account or sign in to comment