From c9f20662bdb3cbabf7a2c0c284265798bbea2796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Steunou?= Date: Fri, 22 May 2015 17:10:44 +0200 Subject: [PATCH] Add a destroy method --- jquery.fittext.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jquery.fittext.js b/jquery.fittext.js index 0b3ddef..f9115df 100644 --- a/jquery.fittext.js +++ b/jquery.fittext.js @@ -20,6 +20,10 @@ 'maxFontSize' : Number.POSITIVE_INFINITY }, options); + $.fn.fitText.destroy = function destroy() { + $(window).off('resize.fittext orientationchange.fittext'); + }; + return this.each(function(){ // Store the object