- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello all,
I’m building a CMS using Bootstraps and I have a problem in changing the CSS of the current pressed button.
What I’d like to achieve is when a button has been clicked its CSS is changed from (using a Javascript function or anything way else).
Here is my HTML button code that has this Bootstraps CSS styling ‘btn btn-primary’:
When this button is clicked, I want it to have only this CSS styling ‘btn’ instead of ‘btn btn-primary’ so the user has indication of what page they’re in.
Any suggestions will be welcome.
Thanks
Yaron
Hi Melindrea,
That was really fast!!
Thanks a lot for that, I’ll try to implement.
Thanks again!
Yaron
It works!
I’ve got one last question please, what if I had a few buttons? #mybtn1, #mybtn2 and etc..?
I throw this as a counter question. This is in a general context, not specific to your project. What do you get if you call:
1. `$(‘body’);`
2. `$(‘div’);`
3. `$(‘div,span’);`
I managed to handle this.
thanks a lot!
Thanks again for your comments.