Try this $('#divcontainer').hover(function(){ $(this).css('background','#fff000').fadeIn(); }, function(){ $(this).css('background','url('images/one.jpg')').fadeIn(); });
On Wed, Jun 15, 2011 at 9:56 PM, Vishnu vg <vaishnav1...@gmail.com> wrote: > Hi all, > > I have a div with a background image named "one.jpg". when i hover over it > i want to change it to another image or background colour. How can i achieve > it using jquery. Now when i put jquery the change is not smooth . I want a > slow change from current backgroudn image to another colour. Please help me > in this regard > > > #divcontainer{ background:url('images/one.jpg');} > > The above seen code is the css code for my div. When i hover over it the > imageshoulde change from current image to a backgroudn colour and on > mouseout it should be the old image agagin. On mousehover the image should > be a clour filled in the entire box. I tried to achieve it using jquery but > the transition is not smooth. I want a smooth transition from current image > to some colour while hovering it and on mouse out , it should return back to > old image again. > Please help me > > -- > With Love, > Vishnu, > Mobile : 9544455735 > > -- > -- > You received this because you are subscribed to the "Design the Web with > CSS" at Google groups. > To post: css-design@googlegroups.com > To unsubscribe: css-design-unsubscr...@googlegroups.com -- Regards, -- -- You received this because you are subscribed to the "Design the Web with CSS" at Google groups. To post: css-design@googlegroups.com To unsubscribe: css-design-unsubscr...@googlegroups.com