You were on dot Sir,

Thanks
I changed the order and t works as I dream.
Thanks again
Have a nice day.

People like you inspire everyone to help others.


On Apr 27, 3:11 am, Dave Cardwell <[EMAIL PROTECTED]> wrote:
> joomlafreak wrote:
> > I have a very basic question. If I use addClass, will it overwrite a
> > css property.
> > Say for example I use
>
> > $(".div1").click(funtion(){
> > $(this).addClass("div_active")
> > });
>
> > The div1 had css property background-color set to white and in the
> > class div_active background property is black.
>
> > Will the addClass make the background of div1 black.
> > I could not do it and it seems the only property that changes is the
> > one not defined previously in .div1.
> > Is there a way to achieve it.
>
> > Thanks
>
> This should work as you have described. In the CSS file, do you have
> .div_active defined after .div1? Normal CSS presedence rules will apply.
>
> If this is the case and it still does not work, if you provide an
> example page we'll be able to locate the problem for you.
>
> --
> Best wishes,
> Dave Cardwell.
>
> http://davecardwell.co.uk/javascript/jquery/

Reply via email to