Skip to content

Instantly share code, notes, and snippets.

@slavapas
Created November 4, 2020 21:22
Show Gist options
  • Save slavapas/50cb2e2cc46d1ee02a9e2e17acb525ae to your computer and use it in GitHub Desktop.
Save slavapas/50cb2e2cc46d1ee02a9e2e17acb525ae to your computer and use it in GitHub Desktop.
hide HTML element untill page loaded using jQuery
// ------------------------------------
// Hide the element untill page loaded
// ------------------------------------
// HTML
<div id="my-modals" class="hide">
// CSS
.hide {
dislplay:none;
}
// JS
jQuery(document).ready($){
$('#my-modals').removeClass('hide');
}
// you can replace #my-modals with any html element, like - body, p, a, image, but not div
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment