# Problems when integrate jquery plugins into emberjs app

**URL:** <https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101>\
**Category:** Uncategorized\
**Created:** [August 9, 2013, 8:24am UTC](https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101 "2013-08-09T08:24:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wjun\_8452](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@wjun\_8452](https://discuss.emberjs.com/u/wjun_8452)\
**Post date:** [August 9, 2013, 8:24am UTC](https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101/1 "2013-08-09T08:24:32Z")

</div>

I want to integrate other jquery plugins into my ember app. I found some posts, like: [Luke Melia » Using Ember.js with jQuery UI](http://www.lukemelia.com/blog/archives/2012/03/10/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](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!

---

<div class="post-metadata">

**Author:** ![johnernaut](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/johnernaut/32/14606_2.png) [@johnernaut](https://discuss.emberjs.com/u/johnernaut)\
**Post date:** [August 9, 2013, 2:28pm UTC](https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101/2 "2013-08-09T14:28:55Z")

</div>

Try tying in your jQuery logic to your views DOM instance (via `this.$()`). You can see an [updated example here](http://jsbin.com/ogutex/1/). Also, [this link is bound to be useful to you](http://mavilein.github.io/javascript/2013/08/01/Ember-JS-After-Render-Event/).

---

<div class="post-metadata">

**Author:** ![pwagenet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pwagenet/32/14172_2.png) [@pwagenet](https://discuss.emberjs.com/u/pwagenet)\
**Post date:** [August 9, 2013, 9:53pm UTC](https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101/3 "2013-08-09T21:53:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pwagenet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pwagenet/32/14172_2.png) [@pwagenet](https://discuss.emberjs.com/u/pwagenet)\
**Post date:** [August 9, 2013, 9:53pm UTC](https://discuss.emberjs.com/t/problems-when-integrate-jquery-plugins-into-emberjs-app/2101/4 "2013-08-09T21:53:42Z")

</div>


