From 83c3435b72aa70e87b5073887b7b035e8383d3a7 Mon Sep 17 00:00:00 2001
From: Denis Jacquemin <denis.jacquemin@gmail.com>
Date: Thu, 17 Nov 2011 12:28:23 +0100
Subject: [PATCH] Adding parameter parentContainer, default is body

---
 js/bootstrap-twipsy.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/bootstrap-twipsy.js b/js/bootstrap-twipsy.js
index 5ebbddd675..a2915fe57e 100644
--- a/js/bootstrap-twipsy.js
+++ b/js/bootstrap-twipsy.js
@@ -83,7 +83,7 @@
         $tip
           .remove()
           .css({ top: 0, left: 0, display: 'block' })
-          .prependTo(document.body)
+          .prependTo($(this.options.parentContainer))
 
         pos = $.extend({}, this.$element.offset(), {
           width: this.$element[0].offsetWidth
@@ -301,6 +301,7 @@
   , offset: 0
   , title: 'title'
   , trigger: 'hover'
+  , parentContainer: 'body'
   , template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
   }
 
-- 
GitLab