Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify what the containing element should be when creating a new instance. #32

Merged
merged 1 commit into from Nov 19, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion humane.js
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down