2
I’m making a Bootstrap-based website, where I have a portfolio zone, where thumbnails open a collapsible DIV. I need that when a collapsible DIV is open, the respective thumbnail changes its CSS formatting, in this case color. I tried to add a class to this so-called ". cliente_active" through my Javascript, but since I am not an expert in the latter language, I did not succeed. I’d appreciate it if you could help me.
My prototype:
Thanks, only you come to help me! : D Now it has two bugs, in which when we close the class the div does not return to what it was initially. And in small screen mode not when we have a div open, when we click the respective button to close it, it closes and reopens.
– user3216077
@user3216077: here it is: http://jsfiddle.net/qN46N/ that’s the way it should be?
– Sergio
@user3216077, already now a suggestion: CSS Transitions for colors? :) http://jsfiddle.net/qN46N/1/
– Sergio
Yes it is. Thank you very much! D
– user3216077
I discovered now some bugs that happen when resizing the browser with an open div. When it goes from a larger dimension to a smaller one, the div closes and the color of the "button" is changed. And when you resize with an open div to a larger dimension (which will most often happen) the open div is on top of the others, and you can’t close, changing the button only by color. Thank you so much for your help once again.
– user3216077
@user3216077, and what about so: http://jsfiddle.net/H8kP2/
– Sergio
No more! 5 stars! Thank you! D
– user3216077