0
I’m trying to change one keyframe CSS
, actually do an update, but I’m not getting concatenar
variables CSS
à javaScript
.
To ideia
, actually, it’s not even changing. But yes, inserir no final do keyframe
the lines created
How to fix this?
tMin = 0;
tMax = 20;
tempoImagens = 20;
$("@keyframe animacao").css({
tMin + "% : margin-left:-" + tempoImagens + "%",
tMax + "% : margin-left:-" + tempoImagens + "%"
});
You are giving error in concatenation.
tMin + "% :
Have you already tested this? Pq the jQuery returns error by placing an arroba (@) in the selector: $("@animation keyframe")
– Sam
Yes, it was a mistake. But it replaces it for $("<style>@keyframe played"). css(, and the error passed, but the keyframe is not being populated.
– Carlos Rocha
Instead of doing . css({ various lines }), try in the simple way . css('style','value')
– Sam
It is not possible because I do not know what values will be used or how many images will be placed. I just need to figure out a way to make that keyframe work. I mean, popular it,
– Carlos Rocha
Good, but in this multi-line format of . css() you won’t be able to concatenate on the left side of
:
...– Sam
Actually I already got it, no error in the browser. But the keyframe is not being populated
– Carlos Rocha