The correct way to do this is to use show and hide:
$('#id').hide();
$('#id').show();
An alternate way is to use the jQuery css method:
$("#id").css("display", "none");
$("#id").css("display", "block");
// Correct way
$('#id').hide();
$('#id').show();
// Alternate way
$("#id").css("display", "none");
$("#id").css("display", "block");
$('li[style*="display: none"]')
$('#idname').hide();
$('#idname').show();