lundi 15 mai 2017

Toggle hidden row of specific element of an - Ember

I've got this chunk of code in my controller to output everything I'd like to in the first row. The second row is going to be available upon a click action. However, I'm trying to make it so that when I click the first row, it'll only display the 2nd row of index 0. Not the 2nd row of index 0,1,2,3 & etc.

This is in my Controller.


   <tr class='main' >
     <td></td>
     <td></td>
     <td></td>
     <td></td>
   </tr>
   
     <tr class='help'>
       <td class='instruction'></td>
       <td class='video'></td>
     </tr>
   


This is my JS for the action.

toggleHelp() {
    this.toggleProperty('isDisplay');
},

I know how I would approach this using jQuery, but I'd like to know the Ember way of doing such action. I thought about including index, but unsure how it should be written.




Aucun commentaire:

Enregistrer un commentaire