-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap hide is not working with jQuery.show #1140
Comments
Can you make a shortcut for this? We should definitely document this in the bootstrap-docs repo (even if we make a shortbut we must show both solutions) |
@Drak I think I will add this to bootstrap-zikula.js. |
ok |
Yes, please do so. |
I think the current solution is not good. This could make problem with bootstrap. I think we to follow the recommendation to work with toggleClass(). |
I thought more about this problem. The set the important tag is not stupid, because otherwise hide is not working in some situations. For example in the nav-bar with display: inline. The behavior is documented in the bootstrap doc. So I will close this issue. |
So we use
in order to show a certain element? |
@Guite yes or myElem.toggleClass('hide'); Btw. our old prototype scripts are also doing it like that. So maybe prototype has the same issue. |
@phaidon - could you spell out how to avoid this problem for current modules in development (e.g. Dizkus)? The module used to use the |
You have to do it like in prototype: Add/remove the class: jQuery('#id').addClass('hide'); |
can you help me understand why or point me to the bootstrap doc that explains? |
bootstrap is using jQuery is using |
ah. I am not using the |
If you dont use hide class you can use jQuery.hide() and jQuery.show(). I am using the hide class for elements that are hidden in the beginning for two reasons:
|
that is why I use |
This is also okay. |
👍 |
I prefer to use |
Without modifying any code that already written there, I would add the following after importing jQuery lib:
This modifys jQuery's show / hide methods outside of any sourcecode, work fine here. |
Hi @nakupanda! However, I think we should rather not add that code, because it would add a non standard way to hide and show stuff. If we added your code, we'd make jQuery.show/hide much more powerful then it really is. |
We can solve it with that. But it is not a nice solution.
The bootstrap ppl know the problem, but are not willing to change the behavior at the moment.
twbs/bootstrap#9237
twbs/bootstrap#9881
The text was updated successfully, but these errors were encountered: