woocommerce/assets/js/frontend/woocommerce.min.js

1 line
1.1 KiB
JavaScript
Raw Normal View History

jQuery(function(a){a(".woocommerce-ordering").on("change","select.orderby",function(){a(this).closest("form").submit()}),a("input.qty:not(.product-quantity input.qty)").each(function(){var b=parseFloat(a(this).attr("min"));b>=0&&parseFloat(a(this).val())<b&&a(this).val(b)})});function checkPasswordStrength(s,a,r){var t=jQuery("#password_1").val();a.removeClass("short bad good strong"),r=r.concat(wp.passwordStrength.userInputBlacklist());var e=wp.passwordStrength.meter(t,r);switch(e){case 2:a.addClass("bad").html(pwsL10n.bad);break;case 3:a.addClass("good").html(pwsL10n.good);break;case 4:a.addClass("strong").html(pwsL10n.strong);break;case 5:a.addClass("short").html(pwsL10n.mismatch);break;default:a.addClass("short").html(pwsL10n.short)}return e}jQuery(document).ready(function(){jQuery("#password_1").keyup(function(){checkPasswordStrength(jQuery("input[name=password_1]"),jQuery("#pass-strength-result"),["black","listed","word"]);var s=jQuery("#password_1").val().length;0>=s?jQuery("#pass-strength-result").css("display","none"):jQuery("#pass-strength-result").css("display","block")})});