Code:
$('#member-profile .form-actions a').remove();
if($('#member-profile').length && $("#profile_tabs li:last-child").is('.active')){
$('#member-profile .form-actions button[type="submit"]').show().addClass('pull-right');
if(id>1) $('#member-profile .form-actions button[type="submit"]').before(' <a class="btn btn-default prev-button pull-left" href="#">'+jsn_prev_button+'</a> ');
}
else if($('#member-profile').length && $("#profile_tabs li:first-child").is('.active')){
$('#member-profile .form-actions button[type="submit"]').hide().addClass('pull-right');
if(id>1) $('#member-profile .form-actions button[type="submit"]').before(' <a class="btn btn-default next-button pull-right" href="#">'+jsn_next_button+'</a> ');
}
else if($('#member-profile').length){
$('#member-profile .form-actions button[type="submit"]').hide().addClass('pull-right')
.before(' <a class="btn btn-default prev-button pull-left" href="#">'+jsn_prev_button+'</a> ')
.before(' <a class="btn btn-default next-button pull-right" href="#">'+jsn_next_button+'</a> ');
}