To set unset active on next and pre click:
$('#next').click(function () {
if($('.jstree-clicked').closest('li').next().length)
$('.jstree-clicked').removeClass('jstree-clicked').closest('li').next().find('a:eq(0)').addClass('jstree-clicked')
});
$('#pre').click(function () {
if($('.jstree-clicked').closest('li').prev().length)
$('.jstree-clicked').removeClass('jstree-clicked').closest('li').prev().find('a:eq(0)').addClass('jstree-clicked')
});