Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute multiple jQuery effects on the same element in parallel

Tags:

jquery

I see that this question was asked many times, but none of the solutions worked for me. I have two effects that I want to execute in parallel.

I want the box to fade-in and bounce simultaneously: http://jsfiddle.net/6VVUG/

like image 606
Registered User Avatar asked May 06 '12 19:05

Registered User


1 Answers

Chain the UI effects, and use dequeue() to execute them all at once.

$("#t").hide().show("fade", {},  {duration:1200}).effect("bounce", { times:3 },  { duration:400}).dequeue();

FIDDLE

like image 182
adeneo Avatar answered Oct 20 '22 05:10

adeneo