I'm testing jQuery (I'm kind of new to programming in general) and I found that whenever I ran the code to hide an element, jQuery made it bigger (in height) and then hid it. It looks messy because both bootstrap and reset .css files are not included, but the error occurs with and without them.
<div class="nav">
<div class="container">
<div class="pull-left">
<span>test1</span> test2</div>
<ul class="pull-right">
<li class="nav-button">button1</li>
<li class="nav-button">button2</li>
<li class="nav-button">button3</li>
<li class="nav-button">button4</li>
</ul>
</div>
</div>
.nav .container {
background-color: red;
}
.pull-right li{
display: inline;
}
.pull-right{
padding-bottom: 0px;
margin-bottom: 0px;
}
$(document).ready(function() {
$('.nav-button').hide(1000);
});
Any idea why? Thanks