user6761578 user6761578 - 2 months ago 14
HTML Question

Hide div onload in javascript

HTML

<div id="b-navbar-fg">
</div>


JavaScript

<script>
$(function(){
$("#b-navbar-fg").hide() // try to hide google navigation bar
});
</script>


This Function is executing in my google blogger page. But I am not able to hide this id on loading page.

EXAMPLE PAGE

Answer

Set Time Out and Then Hide Div.

   hideNavigation(){
      setTimeout(check, 1000);
      $("#b-navbar-fg").hide();
   }
   $(function(){
      hideNavigation()
   });

Else You can do:

Log in to your Blogger account, click on your blog and head to the 'Layout' tab > look for the 'Navbar' heading and click on the Edit link as shown in this picture: Step 2. When the pop-up window appears, scroll down and select 'Off', then click the Save button: And that's it!