First, since you have multiple links, use a class to group them:
Click me 1_1
Click me 1_2
Click me 1_3
$(document).on('click', '.click', function (e) {
var theID = $(this).attr('id');
$('html, body').animate({
scrollTop: $('#' + theID + '_div').offset().top
}, 1000);
return false;
});
I did this with the slight assumption you were dynamically creating these links (hence the delegation). If they are static and won't change during page load, you can use $('.click').click(function()...
instead of $(document).on('click', '.click', function()...