Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [animation]

For questions related to graphical animations. This includes, but is not limited to sliding, tweening, rotating and resizing of shapes.

2
votes
4answers
254 views

Using visual themes in a game

In my small application, I need to use a variety of visual themes. The simplified structure of this class: ...
2
votes
3answers
135 views

Animating the opacity of certain page elements

I wrote this jQuery code to animate the opacity (sort of Fadein) of certain elements on my page in consecutive order. It feels very inelegant, though. ...
23
votes
5answers
82k views

Simple Java animation with Swing

I am learning to use Java Swing and have made a simple animation that makes a small shape bounce around the predetermined borders of a panel. The program works well, but I am looking for feedback in ...
2
votes
2answers
7k views

Animation with 5x5 map of cubes

I am trying to learn how to animate with tkinter. The code below is an example I was able to build. It creates a small 5x5 map of cubes, then one of them randomly moves around the screen (preferably ...
4
votes
2answers
1k views

Is this the correct approach to animation in Java?

I was fiddling with animation in Java and wrote this: ...
2
votes
1answer
5k views

Scrolling, fade-in, and fade-out effects feeling clunky

I'm coming close to finishing a site where there are a number of jQuery functions going on. They all work, but the page is just running a bit too clunky. The fading in and out is just not as smooth as ...
2
votes
1answer
1k views

Timeline animations

I recently made this campus timeline for my university. When viewing the timeline on a mobile device (not a tablet), the navbar changes so that you can jump to the previous or next decade by clicking ...
2
votes
1answer
240 views

Animation for collapsing/expanding a navigation bar

I wrote the following to create an animation which collapses a navigation bar, load new content for it and expands it again. Meanwhile, the rest of the page content fades out, loads and fades in again....
2
votes
1answer
112 views

jQuery eye candy for a WordPress site

This is a follow-up to this question my code has evolved since so I'm reposting my question. What is the best way to tidy this up? How can this be refined? I am finding it's thrashing the layout ...
3
votes
3answers
569 views

jQuery animation and rotation effects for a WordPress site

What is the best way to tidy up JavaScript code I have written? It seems very long winded, any suggestions to shorten it? Note: I'm running it on Wordpress which runs jQuery in nonconflict mode, ...
4
votes
2answers
152 views

Simple element slider animation tool

I'm new to jQuery and I've been messing about with this code, It works but I want to learn how to shorten the code by the eliminating unnecessary repeated code. Here is a link to JSFiddle HTML <...
5
votes
1answer
236 views

Retrocomputing scanline function

I need to refactor this code, targeted to Google Chrome (current+) to make it manageable going forward. Here is a working JSBin of the idea. The messiness comes from determining the accurate number ...
1
vote
1answer
416 views

Website with images that pan to different sides

I've just started programming with JavaScript and I am currently working on this hobby website project of mine. The site is supposed to display pages filled with product images than can be "panned" to ...
1
vote
2answers
387 views

Toggling animations

In the following piece of code I use the same trick three times. But cannot figure out how to write a common function that will do it for all of them. I know there is a toggle method in jQuery that ...
2
votes
3answers
262 views

Animating rotations using jQuery

I am writing a function for a rotating navigation with JS and jQuery. I am using a plugin called jQuery transit for animating rotation. The code works, but it is very long for such a simple function. ...
7
votes
1answer
164 views

Upgrading animation code

I understand that this animation code is outdated: ...
4
votes
2answers
3k views

Animating opacity of 1400 Raphael.js objects hurts animating performance

I am animating 1400 objects trying to create a 'twinkling effect'. As the user moves the mouse faster more hexagon shapes pop into full opacity and have varying fade out rates. The version in the ...
2
votes
2answers
117 views

An “Add” button that clones an item, and a “Remove” button that fades and removes an item

I was looking into removing multiple inputs and selects at once using jQuery, but I couldn't find a solution, so I ended up with the following code: ...
2
votes
2answers
536 views

CSS3 animations of a turntable

I have the following code, which acts like a turntable and plays Sgt. Pepper when you load the page. This works only in Safari (I suppose I can delete the FF parts then), so I'm wondering how I can ...
1
vote
1answer
219 views

Animation effects for menu items

I have pieced together some code that works for my project. However, it is pretty long, but self-similar. I am a jQuery beginner and I tried to shorten the code by using variables, but it didn't work ...
6
votes
3answers
1k views

“Group” animation events in jQuery

I have a number of jQuery animation effects applied to certain elements on the page: ...
0
votes
2answers
292 views

Two icon animations — one on the left, one on the right

I have two icon animations that pretty much do the same thing, the only difference between them is positioning... one is left and the other right. I would like to use one block of code for both left ...
15
votes
3answers
796 views

Sample game code for applying to a development firm

I am contemplating working with a development firm, and had asked for this piece of sample code. Could you please take a look and let me know if this is a quality piece of work, or if it needs ...
1
vote
1answer
242 views

Sequential animations

This is all about a whole lot of animations which should happen sequentially. That's why I am using promise().done() functions. In the end I'm binding a function to ...
1
vote
1answer
233 views

Fade-in / fade-out effects for several buttons

The function of this code is to show/hide divs by way of fadeIn/fadeOut, starting with an empty div (home) and fading in one of the other divs (work,cms,contact,) on click, then fading out the last ...
3
votes
2answers
195 views

Expandable text boxes for legends of fieldsets

What is the best way to refactor the following script? ...
3
votes
2answers
141 views

Periodically sliding images

I wrote this code using jQuery, but I think it can be improved. Can you provide some feedback? ...
4
votes
1answer
634 views

Carousel for website

I have been building my own carousel over the past few days. I am not a jQuery guru, just an enthusiast, and I think my code is a little sloppy, hence the post. Basically what happens is: If someone ...
10
votes
2answers
641 views

Is there a better way to write this jQuery UI effect animation?

I'm writing some code to perform some simple form validation and I would like to display error messages inside the actual relevant textarea by means of a text fadeout/fadein effect. To achieve this I ...
13
votes
2answers
70k views

Fade-in and fade-out in pure JavaScript

I decided to build my own fade-in fade-out function, since that is all I need on my page. Please comment on things I can make better. ...
14
votes
5answers
983 views

Animating one of three boxes based on a form value

Is there a better way to do this without using if or case statements? ...
3
votes
1answer
2k views

Updating progress bar animation

The general idea is is a progress bar that updates the totals and percentage continually. This just gets a bit choppy when I trigger a few of these independently on the same page. I'm doing a bit of ...
3
votes
1answer
264 views

Animation of multiple text elements in sequence

I feel like this isn't the most effective nor efficient way of doing things: ...
6
votes
2answers
416 views

Particles moving around a Perlin Noise field

I made this sketch in Processing (basically Java) that consists of a bunch of particles moving around a Perlin Noise field. Each particle is aware of the position of one other particle and this ...
4
votes
3answers
386 views

Sprite and AnimatedSprite

I have a Sprite class and an AnimatedSprite subclass, and I'd like to decouple these them and maintain substitutability, ...
3
votes
2answers
293 views

Making a ul list element animation on hover

I have an experimental script that makes an animation of a ul list element background-position, when the list element is hovered. Is there another way to manage ...
8
votes
3answers
945 views

Canvas Drawing/Animation

I am trying to learn how to write good, clean, and efficient JavaScript. I consider myself a novice, at best, in JavaScript. Any comments are appreciated. In an effort to become a better JavaScript ...