backbone.js click event not firing

后端 未结 2 1892
鱼传尺愫
鱼传尺愫 2021-01-12 20:07

Going through a very basic tutorial on backbone.js views.

The expected behavior is to call the render function when #sayhello button is clicked. Render simply uses

2条回答
  •  礼貌的吻别
    2021-01-12 21:09

    If you are dynamically rendering the page using the templates, then in the render function consider calling view.setElement(...);

    this.setElement($('#login-container'));

提交回复
热议问题