setTimeout(function() { jQuery("a.close").parent().addClass('flipOutX').removeClass('flipInX').fadeOut('5000', function() { // jQuery("#cuc-error").delay('8000').css('display', 'none'); }); }, 2000); jQuery("a.close").click(function() { jQuery(this).parent().addClass('flipOutX').removeClass('flipInX').fadeOut('5000', function() { jQuery("#cuc-error").css('display', 'none'); }); }); } } <?php if (User::can_add(false, ANY_CATEGORY)) { if (User::can_edit(false, ANY_CATEGORY)) { } else { ?> jQuery(document).ready(function() { jQuery('#grid .k-grid-save-changes').each(function() { this.style.display='none'; }) jQuery('#grid .k-grid-cancel-changes').each(function() { this.style.display='none'; }) jQuery('#grid .k-grid-add').click(function() { jQuery(".k-grid-save-changes", "#grid").show();