No.: kitjs officially discussed the establishment of the QQ group and QQ Group No. 88093625. You are welcome to join the discussion on front-end topics.
Demo address: http://xueduany.github.com/KitJs/KitJs/index.html#shakehead
If no shaking effect is found, remember to clear the cache, because the JS file of the kit. anim object has been updated, 3q3q
Today, I heard my brother in the group discuss the animation effect of shaking his head, similar to the effect of window shaking during login verification, combined with the anim class of kitjs mentioned earlier, we can easily implement similar component shaking effects.
CodeAs follows:
Function A1 (){
$ Kit. anim. Motion ({
Duration: 1000, // duration
El: "# test1 ",
FX: $ kit. anim. FX ('swing '),
From :{
'Margin-left': '50px'
},
To :{
'Margin-left': '0px'
},
Reverse: True,
Timeseg: 33, // shake frequency, Self-Tuning
Then: function (){
$ Kit. Log ('shake finished? Another shake? ')
}
});
}
A config. Reverse parameter is added to the kit. anim. Motion method to control the positive and negative values during animation.
The results are good. If you are interested, try it.
If you have more requirements or suggestions, add a group to discuss them. ^_^