Inlining a change event

This commit is contained in:
Antonin 2015-10-30 21:50:44 +01:00
parent 7b05eeec44
commit 91de1661bb

View File

@ -36,9 +36,8 @@ $(document).ready(function () {
/** /**
* Hide/Show password options * Hide/Show password options
*/ */
var usePassword = $("#use_password"); $("#use_password").change(function(){
usePassword.change(function(){ if ($(this).prop("checked")) {
if (usePassword.prop("checked")) {
$("#password_options").removeClass("hidden"); $("#password_options").removeClass("hidden");
} else { } else {
$("#password_options").addClass("hidden"); $("#password_options").addClass("hidden");