Use Javascript to scroll in HTML tables? -
i have few table in scrollbox. upon loading page automatically scroll first empty table row using javascript. possible?
$("table tr").each(function() { var cell = $.trim($(this).find('td').text()); if (cell.length == 0){ var el = cell; el.scrollintoview(true); }
once have empty row, can scroll this.
function scrollintoview(el){ window.scrolltop( el.offset().top - ($(window).height()/2) ); }
Comments
Post a Comment