javascript - jquery slide large table in sections left and right -


i have display table many columns on web page. columns days of week therefore 7 columns need displayed @ once (out of 4 weeks in total).

i have set window overflow set hidden displays first 7 days , managed table scroll left 7 days table won't scroll further this. if scroll table scrolls far , table totally disappears right.

i quite new jquery , realise should using possibly position() or offset() functions. sure simple piece of code although hours of googling have turned nothing covers problem.

does know decent tutorials out there me started ? thanks

it having container div of 500px overflow set hidden continaing seperare div of 2000px. when user clicks on previous or next buttons inner div scroll plus or minus 500px dependent on position.

try this:

$('.next').click(function(event){     if($('.table').css('left') != '-1500px') {     $(this).prop('disabled', true)             $('.table').animate({left:'-=500px'}, 500, function() {               $('.next').prop('disabled', false)             }); } });   $('.prev').click(function(event){     if($('.table').css('left') != '0px') {     $(this).prop('disabled', true)            $('.table').animate({left:'+=500px'}, 500, function() {               $('.prev').prop('disabled', false)             }); } }); 

http://jsfiddle.net/zsffs/27/


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -