Vra

Having some velocity.js problems with opacity

for example, in the css file :

#background{ opacity: .5 }

and the coffee script part :

$("#backgound").velocity(
  opacity: 0
, 350)

velocity won't be of any effect. Same goes with background color : if for example #background{ background-color: rgba(255, 255, 255, 0.5) }, changing the background color through velocity won't be of any effects neither

Any feedback appreciated on this one!

Was dit nuttig?

Oplossing

Check this [ EXAMPLE ]
I did what you want with both opacity and backgroundColor.
Velocity not supporting rgba() yet, but you can use backgroundColor with HEX unit and change its transparency by backgroundColorAlpha.

Good Luck

Ander wenke

You're forgetting to use brackets -->

$("#backgound").velocity({ opacity: 0 }, 350)

try this : braket forgetting!!

$div.velocity({
    properties: { opacity: 1 },
    options: { duration: 500 }
});

http://julian.com/research/velocity/

Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top