I have a JQuery function that adds classes to an element. I want to use the http://daneden.me/animate/ animation package. To do this, I needed to add two classes, "animated" and "animation type example", to my element. However, instead of adding a simple animation class, I wanted to change animate.css to animate.less so that I could pass in mixin parameters. But the JQuery addClass() function doesn't recognize my code as being valid.
ex] .animated{//effects} has already been changed to: .animated(@duration, @delay){//effects}
The code that works without mixins:
function waterColorAnmiation(){
$("#stroke1").addClass("animated fadeInUp");
}
What I've tried in order to use mixins for @duration & @delay:
function waterColorAnmiation(){
$("#stroke1").addClass("animated(1, 3) fadeInUp");
}
Please let me know if you have suggestions or if there is a much easier way to accomplish this. Thanks!
You can't do that, you need to define a new class for the mixin animated(1, 3)
then use it like
In your less file
.animated13 {
.animated(1, 3);
}
then
$("#stroke1").addClass("animated13 fadeInUp");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With