Poster swing plugin can be used for adding poster swing effect on html elements. The plugin uses rotation transform for adding the swing effect. See http://caniuse.com/#feat=transforms2d to check which browser will support this.
You must include jQuery.js and jquery.posterSwing.js (or
jquery.posterSwing.min.js) in you web page in order to use this plugin.
<script src="jquery.min.js" type="text/javascript"></script> <script src="jquery.posterSwing.min.js" type="text/javascript"></script>
For adding poster swing effect to any html element, use following with jQuery selector -
$(function () {
$("#myDiv").posterSwing([options]);
});
Currently following options are available -
duration : (default value 4000)
angle : (default value 30)
swingCenter : (default value top center = 50% 5%)