ivaynberg/select2 — pull request #1757 by ramprasadg (2013-09-27 09:17:30+00:00)
Title: Adding a optional parentElement

![screen shot 2013-09-27 at 2 43 04 pm-small](https://f.cloud.github.com/assets/1859514/1224803/90f65904-2755-11e3-9959-75a83cf8b619.png)
![screen shot 2013-09-27 at 2 43 19 pm-small](https://f.cloud.github.com/assets/1859514/1224806/96ce3cca-2755-11e3-8566-8f7e38b173ac.png)

dropdown menu lingers around in backbone js apps.

At present select2 appends the created div elements to body tag.
But when I use select2 with my Backbone JS application I face problems because body tag is not emptied every time. I only render a part of the body.
So I found it beneficial to externally control the parentElement to which select2 adds new elements.
These elements are automatically deleted when parentElement is destroyed.