').appendTo('#table_entities');
- this.columns = {
- id: $('').text(this.id).appendTo(this.row),
- position: $(' | ').appendTo(this.row),
- speed: $(' | ').appendTo(this.row),
- color: $(' | ').appendTo(this.row),
- actions: $(' | ').appendTo(this.row),
- }
- $('')
- .attr('type', 'color')
- .change(function(){
- console.log($(this).val());
- elem.css('background-color', $(this).val());
- })
- .appendTo(this.columns.color)
- .change();
+ this.elem = $(' ').addClass('point').appendTo('body');
+ this.row = $(' |
').appendTo('#table_entities');
+ this.columns = {
+ id: $('').text(this.id).appendTo(this.row),
+ position: $(' | ').appendTo(this.row),
+ speed: $(' | ').appendTo(this.row),
+ color: $(' | ').appendTo(this.row),
+ actions: $(' | ').appendTo(this.row),
+ }
+ $('')
+ .attr('type', 'color')
+ .change(function(){
+ entity.elem.css('background-color', $(this).val());
+ })
+ .appendTo(this.columns.color)
+ .change();
+ $(' |