backbone.js click event not firing

后端 未结 2 1893
鱼传尺愫
鱼传尺愫 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:02

    It's because #sayhello is not part of your view. Try putting #sayhello inside #helloworld:

提交回复
热议问题