Jquery Table rotate verticaly if height is larger then monitor -
i try create animation table jquery when height larger resolution auto scrolling/rotate/marquee.
but out luck. have try http://remysharp.com/demo/marquee.html plugin.
this simple example, hope
you'll find table on page when browser window smaller 400 pixels marquee plugin start.
when browser window become greater 400 px marquee plugin stop
<!doctype html> <html> <head> <style> #marquee{width:200px;} table{border-collapse:collapse;} table,td {border:1px solid black;} td{width:400px} </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!--isert link marquee plugin download https://gist.github.com/remy/2484402--> <script type="text/javascript" src="marquee.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('marquee').marquee(); var lar=$('td').width() function addmarquee(){ var len=$('marquee').length if(len===0){ console.log('si') $('table tr td span').wrap('<marquee behavior="scroll" direction="left" scrollamount="2" width="350"></marquee>') } } function deletemarquee(){ var len=$('marquee').length if(len>0){ $('table tr td span').unwrap() } } $(window).resize( function(){ var width = $(window).width(); if(width<400){ addmarquee() }else{ deletemarquee() } }) }) </script> </head> <body> <table> <tr><td><span>start lorem ipsum dolor sit amet end</span></td></tr> <tr><td><span>start lorem ipsum dolor sit amet end</span></td></tr> </table> </body> </html>
hope example you
Comments
Post a Comment