To combine operators .hide(), you will need a selector that applies to all four elements. You can do it:
$('#fancybox-wrap,#fancybox-overlay,#panel_login,#panel_all').hide();
Or you can give these elements a common class:
$('.someClass').hide();
Please also note that your first line can be simplified by combining calls .removeClass():
$('.login_inputbox').removeClass("register_inputbox_error login_inputbox_error register_inputbox_ok login_inputbox_ok");
source
share