I am trying to create some simple buttons. I have managed to get a Jquery code which on click changes the css attributes. here the code:
> $(document).ready(function(){
> $(".but1").click(function(){
> $(this).css("background-color","white");
> $(this).css("font-size", "9px");
>
> });
>
> });
Now, how can I make it that it removes the code when i click on another object?
I have found this:
$(this).css("background-color", "")
but how can I use?
I know that it can be done with something like that:
$(document).ready(function(){
$(".men1").click(function(){
$(this).addClass("my class").siblings().removeClass("my class");
});
});
however, it seems that in my web i cannot get the background to work just width and height...
how can I solve this????