JavaScript The event on backbone view is not triggering event in backbone view,backbone event click outside view,trigger

I have written Backbone view - ListView and want to display table in to it. For individual table rows, there is another view - EmployeeView.

I am binding click event on delete button which is inside template with function-deleteEmployee(), but looks like event is not working and function is not called.

Here is the code block-

            app.ListView = Backbone.View.extend({

                tagName : 'table',

                render : function() {

                    $(this.el).append("<tr><td>Employee</td><td>Designation</td><td>Edit</td><td>Delete</td></tr>");
                    app._collection.each(this.renderEmployee, this);
                    $('#main').append(this.$el.html());
                    // main is the main div tag inside body

                },

                renderEmployee : function(model) {

                    var employeeView = new app.EmployeeView({
                        model : model
                    });

                    $(this.el).append(employeeView.render().el);

                },

                initialize : function() {

                    app._collection.on('reset', this.render, this);

                    app._collection.fetch();
                    console.log(JSON.stringify(app._collection));

                }
            });


            app.EmployeeView = Backbone.View.extend({

                tagName : 'tr',

                template : _.template($("#employee-template").html()),

                events : {

                    "click input#editemp" : 'editEmployee',
                    "click input#deleteemp" : 'deleteEmployee'

                },

                render : function() {

                    console.log('inside employeeView');
                    console.log(JSON.stringify(this.model));
                    this.$el.html(this.template(this.model.toJSON()));
                    this.delegateEvents();
                    return this;

                },


                editEmployee : function() {

                },

                deleteEmployee : function() {

                    alert('Hello');

                }

            });

Here is the template-

    <script type="text/template" id="employee-template" >

        <td><%= name %></td>
        <td><%= designation %></td>
        <td><input id="editemp" type="button" value="Edit"/></td>
        <td><input id="deleteemp" type="button" value="Delete"/></td>

    </script>
Answer:1

this is my code currently: let array = [`1 (1).jgp`,`1 (2).jgp`,`1 (3).jgp`,`1 (4).jgp`,`1 (5).jgp`,`1 (6).jgp`,`1 (7).jgp`,`1 (8).jgp`,`1 (9).jgp`,`1 (10).jgp`,`1 (11).jgp`] //rest of the code Is ...

this is my code currently: let array = [`1 (1).jgp`,`1 (2).jgp`,`1 (3).jgp`,`1 (4).jgp`,`1 (5).jgp`,`1 (6).jgp`,`1 (7).jgp`,`1 (8).jgp`,`1 (9).jgp`,`1 (10).jgp`,`1 (11).jgp`] //rest of the code Is ...

How to set value for input="color" when typing in input(.color-scheme__log-input-text), for example if I type #060606 - this color have to be applied to input="color" как изменить цвет input="color" ...

How to set value for input="color" when typing in input(.color-scheme__log-input-text), for example if I type #060606 - this color have to be applied to input="color" как изменить цвет input="color" ...

  1. value input color
  2. input value color css
  3. input value color change
  4. input value color html
  5. set value input color
  6. value input type color
  7. change input value color css
  8. input value text color
  9. input value font color
  10. change input value color jquery
  11. bootstrap input value color
  12. input value background color
  13. jquery input value color
  14. change input value color using jquery
  15. input value default color
  16. input color value rgb
  17. javascript change input value color
  18. get value of input color jquery
  19. get value of input color
  20. input color value not working

I am pretty new in Angular 2. I am studying how to create modules into an Angular app and I have the following doubt related a tutorial that I am following. My doubt is related to the routing. So in ...

I am pretty new in Angular 2. I am studying how to create modules into an Angular app and I have the following doubt related a tutorial that I am following. My doubt is related to the routing. So in ...

  1. what exact meaning of love
  2. what is the exact meaning of crush
  3. what is the exact meaning of ego
  4. what is the exact meaning of attitude
  5. what is the exact meaning of dating
  6. what is the exact meaning of crush in hindi
  7. what is the exact meaning of life
  8. what is the exact meaning of lol
  9. what is the exact meaning of virgin
  10. what is the exact meaning of peer tutoring
  11. what is the exact meaning of civilization
  12. what is the exact meaning of bae
  13. what is the exact meaning of democracy
  14. what is the exact meaning of memorial day
  15. what is the exact meaning of merry christmas
  16. what is the exact meaning of science
  17. what is the exact meaning of crush in tamil
  18. what is the exact meaning of global warming
  19. what is exact meaning of serverless computing in cloud
  20. what is the exact meaning of corruption

I searched a lot on the internet but I still can't find the right answer to my question. I am trying to "print" all the selected values out of multiple checkboxes on my html-page. However, this works ...

I searched a lot on the internet but I still can't find the right answer to my question. I am trying to "print" all the selected values out of multiple checkboxes on my html-page. However, this works ...

  1. multiple values checkboxes
  2. multiple checkbox values in php
  3. multiple values checkbox html
  4. multiple values checkbox jquery
  5. multiple checkbox values in javascript
  6. multiple checkbox values in angular 5
  7. multiple checkbox values in angularjs
  8. multiple checkbox values in servlet
  9. multiple checkbox values in jsp
  10. multiple checkbox values in angular 6
  11. multiple checkbox values angular
  12. multiple checkbox values in mysql
  13. multiple checkbox values excel
  14. multiple checkbox values codeigniter
  15. multiple checkbox values get
  16. multiple checkbox value get in jquery
  17. multiple checkbox value insert in php
  18. multiple checkbox value insert in codeigniter
  19. multiple checkbox value get in php
  20. multiple checkbox value insert update and delete in php