<div style="width: 1024px; background-color: #FFFF00;"> <marquee direction="left"><strong>Left Direction</strong></marquee> </div> <div style="width: 1024px; background-color: #CCFFCC;"> <marquee direction="right"><strong> Right Direction</strong></marquee> </div>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script src="http://code.jquery.com/jquery-1.9.1.min.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Scroll Text</title><style type="text/css">.scroll{ width:430px; height:21px; overflow:hidden; position:relative; } .scrollingtext{ white-space:nowrap; position:absolute; } </style><script type="text/javascript">$(document).ready(function() { $('.scrollingtext').bind('marquee', function() { var ob = $(this); var tw = ob.width(); var ww = ob.parent().width(); ob.css({ right: -tw }); ob.animate({ right: ww }, 20000, 'linear', function() { ob.trigger('marquee'); }); }).trigger('marquee'); }); </script></head><body><div class="scroll"> <div class="scrollingtext"> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </div></div></body></html>
Thanks, A2H My Blog
Login to post response