From 9984fa8671f9a6baff5054f044222332f4f70902 Mon Sep 17 00:00:00 2001 From: "Chakib.B (Spike)" Date: Tue, 3 Apr 2012 12:21:58 +0200 Subject: [PATCH] New shown status --- js/bootstrap-magic-button.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/bootstrap-magic-button.js b/js/bootstrap-magic-button.js index ecf3286..2b9ab9c 100644 --- a/js/bootstrap-magic-button.js +++ b/js/bootstrap-magic-button.js @@ -36,6 +36,7 @@ function ($) { this.$parentPosition = this.$parentDiv.position(); this.$parentMarginLeft = this.$parentDiv.css('margin-left') this.options = $.extend({}, $.fn.magicBtn.defaults, options) + this.$shown = false // Store number of buttons on parent div if (!this.$parentDiv.data('nbMagicBtns')) this.$parentDiv.data('nbMagicBtns', 1) @@ -125,11 +126,13 @@ function ($) { left: this.$left, 'background-image': (this.$isToggled) ? this.$toggleImgUrl : this.$imgUrl }).show() + this.$shown = true } , hide: function () { this.$element.hide() + this.$shown = false } ,