From 8eebfe267bc5bc14e8a16e239d00ee1eb9d6b10d Mon Sep 17 00:00:00 2001 From: Sina Salek Date: Wed, 5 Jun 2019 12:39:55 +0430 Subject: [PATCH] new alterResult callback and extra parameter Adds second parameter input (input element instance) to onResult Also adds a new callback alterResult(result, input) for altering result --- jquery.strengthify.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jquery.strengthify.js b/jquery.strengthify.js index 0bc0efa..e3cf03c 100644 --- a/jquery.strengthify.js +++ b/jquery.strengthify.js @@ -92,8 +92,11 @@ '"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')"' ); + if (options.alterResult) { + result = options.alterResult(result, this); + } if (options.onResult) { - options.onResult(result); + options.onResult(result, this); } // style strengthify bar