Skip to main content
338 votes
18 answers
519k views

jQuery animate backgroundColor

I am trying to animate a change in backgroundColor using jQuery on mouseover. I have checked some example and I seem to have it right, it works with other properties like fontSize, but with ...
SteveCl's user avatar
  • 4,559
181 votes
21 answers
202k views

Animate element to auto height with jQuery

I want to animate a <div> from 200px to auto height. I can’t seem to make it work though. Does anyone know how? Here’s the code: $("div:first").click(function(){ $("#first").animate({ ...
Daniel's user avatar
  • 1,879
59 votes
7 answers
122k views

Rotating a Div Element in jQuery

Trying to rotate a div element...This might be DOM blasphemy, could it work possibly with a canvas element? I'm not sure - if anybody has any ideas of how this could work or why it doesn't, I'd love ...
user43889's user avatar
  • 601
88 votes
7 answers
237k views

CSS rotation cross browser with jquery.animate()

I'm working on creating a cross-browser compatible rotation (ie9+) and I have the following code in a jsfiddle $(document).ready(function () { DoRotate(30); AnimateRotate(30); }); function ...
frenchie's user avatar
  • 52.1k
250 votes
6 answers
398k views

animating addClass/removeClass with jQuery

I am using jQuery and jQuery-ui and want to animate various attributes on various objects. To explain the issue here, I've simplified it to one div that changes from blue to red when the user moves ...
Johannes's user avatar
  • 6,399
64 votes
13 answers
160k views

Scroll smoothly to specific element on page

I want to have 4 buttons/links on the beginning of the page, and under them the content. On the buttons I put this code: <a href="#idElement1">Scroll to element 1</a> <a href="#...
M P's user avatar
  • 905
19 votes
10 answers
75k views

How to make a jquery infinite animation?

I'm trying to implement a jQuery function with an infinite loop to animate the body background with 3 colours. I cannot think of a nice and clean solution. Something like this? $(document).ready(...
Mauro74's user avatar
  • 4,806
59 votes
12 answers
140k views

jQuery animate background position

I can't seem to get this working. $('#product_family_options_dd').animate({ height: '300px', width: '900px', backgroundPosition: '-20px 0px', }, The height and width animate but not ...
jimbo's user avatar
  • 621
32 votes
9 answers
129k views

Animate background image change with jQuery

I finally have this working now but would like to know how I can use JQuery's animate function to make the background image changes fade in nicely when you hover over the list items on the homepage:- ...
Jonathan Lyon's user avatar
191 votes
12 answers
821k views

jQuery .scrollTop(); + animation

I set the page to scroll to top when a button is clicked. But first I used an if statement to see if the top of the page was not set to 0. Then if it's not 0 I animate the page to scroll to the top. ...
Juan Di Diego's user avatar
40 votes
2 answers
12k views

jQuery $.animate() multiple elements but only fire callback once

If you select a class or collection of elements to animate with jQuery: $('.myElems').animate({....}); And then also use the callback function, you end up with a lot of unneccessary animate() calls. ...
totallyNotLizards's user avatar
77 votes
5 answers
73k views

Correct way to animate box-shadow with jQuery

Which is the correct syntax to animate the box-shadow property with jQuery? $().animate({?:"0 0 5px #666"});
chchrist's user avatar
  • 19.6k
132 votes
6 answers
338k views

Animate scroll to ID on page load

Im tring to animate the scroll to a particular ID on page load. I have done lots of research and came across this: $("html, body").animate({ scrollTop: $('#title1').height() }, 1000); but this seems ...
Adi's user avatar
  • 4,024
27 votes
3 answers
79k views

Show Div when scroll position

First of all i would like to refer to this website: http://annasafroncik.it/ I love the way the animations come into view. Is it hard to create a similar function in jquery? Are there any plugins to ...
idbranding's user avatar
22 votes
7 answers
33k views

JQuery synchronous animation

In many cases I wish animation to be executed synchronously. Especially when I wish to make a a series of sequential animations. Is there an easy way to make a jQuery animate function call ...
Elazar Leibovich's user avatar

15 30 50 per page
1
2 3 4 5
33