Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

$("#buttonEditComment").toggle(); 
like image 806
siannone Avatar asked Apr 27 '12 10:04

siannone


1 Answers

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

like image 73
siannone Avatar answered Nov 02 '22 08:11

siannone