Permalink
Browse files

Merge pull request #32 from jisaacks/master

Allow user to specify what the containing element should be when creating a new instance.
  • Loading branch information...
2 parents 9ddeb61 + 5cfd352 commit 0df08058d541d4146ecbc3eedeecce58927735a7 @wavded committed Nov 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 humane.js
View
@@ -53,6 +53,7 @@
this.waitForMove = o.waitForMove || false
this.clickToClose = o.clickToClose || false
this.forceNew = o.forceNew || false
+ this.container = o.container || doc.body
try { this._setupEl() } // attempt to setup elements
catch (e) {
@@ -65,7 +66,7 @@
_setupEl: function () {
var el = doc.createElement('div')
el.style.display = 'none'
- doc.body.appendChild(el)
+ this.container.appendChild(el)
this.el = el
this.removeEvent = ENV.bind(this.remove,this)
this.transEvent = ENV.bind(this._afterAnimation,this)

0 comments on commit 0df0805

Please sign in to comment.