[feature/avatars] Change avatar javascript to conform to new coding guidelines

PHPBB3-10018
This commit is contained in:
Marc Alexander 2013-01-04 18:13:49 +01:00
parent 8f8527a416
commit a342e47038
3 changed files with 9 additions and 9 deletions

View file

@ -2,14 +2,14 @@
"use strict"; "use strict";
function avatar_hide() { function avatarHide() {
$('#avatar_options > div').hide(); $('#avatar_options > div').hide();
var selected = $('#avatar_driver').val(); var selected = $('#avatar_driver').val();
$('#avatar_option_' + selected).show(); $('#avatar_option_' + selected).show();
} }
avatar_hide(); avatarHide();
$('#avatar_driver').bind('change', avatar_hide); $('#avatar_driver').bind('change', avatarHide);
})(jQuery); // Avoid conflicts with other libraries })(jQuery); // Avoid conflicts with other libraries

View file

@ -2,14 +2,14 @@
"use strict"; "use strict";
function avatar_hide() { function avatarHide() {
$('#avatar_options > div').hide(); $('#avatar_options > div').hide();
var selected = $('#avatar_driver').val(); var selected = $('#avatar_driver').val();
$('#avatar_option_' + selected).show(); $('#avatar_option_' + selected).show();
} }
avatar_hide(); avatarHide();
$('#avatar_driver').bind('change', avatar_hide); $('#avatar_driver').bind('change', avatarHide);
})(jQuery); // Avoid conflicts with other libraries })(jQuery); // Avoid conflicts with other libraries

View file

@ -2,14 +2,14 @@
"use strict"; "use strict";
function avatar_hide() { function avatarHide() {
$('.[class^="avatar_option_"]').hide(); $('.[class^="avatar_option_"]').hide();
var selected = $('#avatar_driver').val(); var selected = $('#avatar_driver').val();
$('.avatar_option_' + selected).show(); $('.avatar_option_' + selected).show();
} }
avatar_hide(); avatarHide();
$('#avatar_driver').bind('change', avatar_hide); $('#avatar_driver').bind('change', avatarHide);
})(jQuery); // Avoid conflicts with other libraries })(jQuery); // Avoid conflicts with other libraries