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
*/
var usePassword = $("#use_password");
usePassword.change(function(){
if (usePassword.prop("checked")) {
$("#use_password").change(function(){
if ($(this).prop("checked")) {
$("#password_options").removeClass("hidden");
} else {
$("#password_options").addClass("hidden");