Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

show that elements can be added to the table on the demo page

  • Loading branch information...
commit 4e6a1a4d8882fca538cc73df347eeb3e02ce5e3f 1 parent 9d27e85
@reednj authored
Showing with 24 additions and 1 deletion.
  1. +24 −1 Test/demo.html
View
25 Test/demo.html
@@ -60,6 +60,7 @@
var Ui = {
init: function() {
this.create_t1();
+ this.create_t2();
this.create_t3();
},
@@ -74,7 +75,7 @@
}
},
- create_t3: function() {
+ create_t2: function() {
this.jst2 = new jsTable('t2');
this.jst2.addColumn('March');
this.jst2.addColumn('April');
@@ -91,6 +92,24 @@
}
},
+ create_t3: function() {
+ this.jst3 = new jsTable('t3');
+ this.jst3.addColumn('number', 'Number');
+ this.jst3.addColumn('button', 'Button');
+
+ for(var i=1; i < 3; i++) {
+ var rc = this.random_cell();
+
+ this.jst3.addRow(rc, $e('input', {
+ 'type': 'button',
+ 'value': 'show alert',
+ 'events': {
+ 'click': function() { alert('alert'); }
+ }
+ }));
+ }
+ },
+
add_random: function() {
this.jst.addRow(this.jst.rowCount()+1, this.random_cell(), this.random_cell());
},
@@ -145,6 +164,10 @@
</div>
</div>
+<div class='desc' style='padding-top: 16px;'>You can add elements to the table as well as text. Just pass the element as an argument to addRow()</div>
+<div class='box'>
+ <div id='t3'></div>
+</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.