Created
November 13, 2019 04:42
-
-
Save mahbubur001/8ec5ea065bb1fcb0e14dbed1a1e8177b to your computer and use it in GitHub Desktop.
Revisions
-
mahbubur001 created this gist
Nov 13, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ (function ($) { function scaleCaptcha() { $('.ginput_container.ginput_recaptcha').each(function () { var self = $(this), width = $(this).parent().width(); if (width < 302) { var scale = width / 302; self.css('transform', 'scale(' + scale + ')'); self.css('-webkit-transform', 'scale(' + scale + ')'); self.css('transform-origin', '0 0'); self.css('-webkit-transform-origin', '0 0'); } }); } // Initialize scaling scaleCaptcha(); // Update scaling on window resize // Uses jQuery throttle plugin to limit strain on the browser $(window).resize($.throttle(100, scaleCaptcha)); })(jQuery);