handling jQuery onClick event on handlebars

前端 未结 3 1912
花落未央
花落未央 2020-12-31 06:18

I would like to set up a simple jQuery onClick event to make the UI dynamic on a handlebars template. I was wondering to addClass() after a specific click.

consider

3条回答
  •  长发绾君心
    2020-12-31 07:13

    I am not sure what your problem exactly is. It's correct like this if you keep your JavaScript in a *.js file, perhaps using parent() instead on prev() in this specific case.

提交回复
热议问题