You can check if your element is checked with jquery is(':checked'), and if true, go to the associated overlay with that element with scrollTop:
jQuery('.check_'+onderzoekid).each(function()
{
if ( $(this).is(':checked') )
{
$('html, body').animate({
'scrollTop' : jQuery('.overlay_'+onderzoekid).position().top
});
}
});
Hope this helps.
source
share