Created
September 2, 2012 06:44
-
-
Save iotashan/3595432 to your computer and use it in GitHub Desktop.
Here's a snippet from my app.js file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // include our reusable component | |
| // | |
| var BeerRow = require('BeerRow'); | |
| // | |
| // create our rows | |
| // | |
| for (var i in beers) { | |
| var newRow = new BeerRow(beers[i]); | |
| newRow.view.addEventListener('click',function(e){ | |
| alert('You clicked on '+e.row.pullBeer().name); | |
| }); | |
| tableRows.push(newRow.view); | |
| } | |
| // | |
| // add our rows to the table | |
| // | |
| beerTable.data = tableRows; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment