siannone siannone - 11 months ago 27
Javascript Question

Twitter Bootstrap hide css class and jQuery

I'm using the hide css class to hide a button on page load.

The problem is that when i try to show the button i've previuosly hidden with jQuery the button is smaller.

(the same thing doesn't happen when i use jQuery to hide and then show the button)

Thanks for helping.

Edit: hide class is just this:

.hide {
display: none;

My button:

<a class="btn hide" id="buttonEditComment" href="javascript:void()"><i class="icon-comment"></i> Edit comment</a>

Javascript i use to show the button:



As dfsq said i just had to use removeClass("hide") instead of toggle()