Skip to content

Commit

Permalink
fix tiptop destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
Radosław Hryciów committed Jun 12, 2014
1 parent 47541ef commit 09898f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tiptop.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@
};

Tiptop.prototype._destroyTiptops = function() {
var tips = document.querySelectorAll('.tiptop'),
var me = this,
tips = document.querySelectorAll('.tiptop'),
tipsLength = tips.length;

for (var i = 0; i < tipsLength; i++) {
tips[i].parentNode.removeChild(tips[i]);
me._removeTiptop(tips[i].parentNode);
}

_created = false;
Expand All @@ -94,6 +95,10 @@
window.onresize = null;
};

Tiptop.prototype._removeTiptop = function(tiptop) {
tiptop.parentNode.removeChild(tiptop);
};

Tiptop.prototype._prepareHtmlTemplate = function(title, text, positions, dotSize, hoverSize, hoverPos, showOnInit) {

var directions = ['top', 'right', 'bottom', 'left'],
Expand Down

0 comments on commit 09898f8

Please sign in to comment.