Problems when integrate jquery plugins into emberjs app

I want to integrate other jquery plugins into my ember app. I found some posts, like: Luke Melia » Using Ember.js with jQuery UI

It said that view’s didInsertElement() is the best place to initialize other plugins. I tried that way but result turned out to be different.

This event is fired when the view’s tag is rendered, but its inside #each child element is not rendered.

I made a demo page in jsbin to tell the problem. http://jsbin.com/ohodub/93

It is expected that in the page, a text of “selected elements: 1” should be displayed, but currently it is “selected elements: 0”

Please help me to solve this problem!

Try tying in your jQuery logic to your views DOM instance (via this.$()). You can see an updated example here. Also, this link is bound to be useful to you.

1 Like

In the future, StackOverflow is a better place to ask these sorts of questions. Thanks!