change @keyframe CSS dynamically
Then!
I am new here. First topic and i need you help. Thank you to who can help-me.
I am trying create a slideShow plugin for praticate same and stopped in a trouble.
I have the below code:
- var arrayJson =
- {
- '0%' : { 'margin-left':'-0%'},
- '33%' : { 'margin-left':'-0%'},
- '38%' : { 'margin-left':'-100%'},
- '66%' :{ 'margin-left':'-100%'},
- '71%' : { 'margin-left':'-200%'},
- 100%' : { 'margin-left':'-200%'},
- }
And i need change a keyframe css called slide:
- <styles>
- .......
- @keyframe slide {}
- </style>
I alread try of 2 forms below:
- $.keyframe.define([{
- name: 'tocaSlide',
- content : function () {
- return arrayJson ;
- }
- }]);
where slide2 is a arrayJson showed in the top of this topic.
I too try with :
- var arrayJson2 =
- {
- '0% : { margin-left:-0%'},
- 33% : { margin-left:-0%'},
- 38% : {'margin-left:-100%'},
- '66% :{ margin-left:-100%'},
- 71% : { margin-left:-200%'},
- 100% : {'margin-left:-200%'},
- }
with:
- $("style#tocaSlide").css({arrayJson2 });
More nothing works!
What am i doing of wrog?