I have a div with class "divItemclass" .for this class, i have put height as auto.This div contains some data(text/ images ) .Now i want to change the class to another class when user clicks on the delete button. I am using the below code to do so
$("#divRoundItem").removeClass().addClass("divGlowToDelete").fadeIn(500);
and in my css
.divGlowToDelete
{
background-color:Red;
border:1px solid red;
height:auto;
}
But when this happens,since i had given the height as auto .It is not showing red bg color for the entire div.If i change the height from auto to a fixed height(ex :20 px ) .It is showing red color bg as of that much height. But i cant mention a height as the length of contents comes in side the div is dynamic. How to solve this ? I think it would be good if i can take the current height of div and assign it to the new class (divGlowToDelete) at runtime (when changing the class)
How to do ? thanks in advance