jQuery文字和图片跑马灯特效 支持水平垂直文字和图片等各种元素
JavaScript Code
- <script>
- $(window).load(function(){
- $('.str1').liMarquee();
- $('.str2').liMarquee({
- direction: 'right'
- });
- var stringEl = $('.str3').liMarquee();
- $('.speedChange').on('click',function(){
- var speedChange = $(this);
- var dataSpeed = speedChange.data('scrollamount');
- stringEl.trigger('mouseenter');
- stringEl.data({scrollamount:dataSpeed});
- stringEl.trigger('mouseleave');
- return false;
- });
- $('.str4').liMarquee({
- drag: false
- });
- $('.str5').liMarquee({
- hoverstop: false
- });
- $('.str6').liMarquee();
- $('.btnPause').on('click',function(){
- $('.str6').liMarquee('pause');
- });
- $('.btnPlay').on('click',function(){
- $('.str6').liMarquee('play');
- })
- });
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_635.html