Demo of Interlinked Slider and Spinner

HTML

<div id="slider"></div>
<div id=d1></div>
<input id="spinner" class='selector' size=3>

JQuery

<script>
$(document).ready(function() {
//////////////////////////
$(function() {
/////////////    
$( "#slider" ).slider({value:50,min: 0,max: 100,step: 1,slide: function( event, ui ) {
$( "#d1" ).html( ui.value );
$( "#spinner" ).val(ui.value) // set the value of spinner
}
});
///////////
$( "#spinner" ).spinner({value:50,min: 0,max: 100,step: 1,spin: function( event, ui ) {
$( "#d1" ).html(ui.value) // set the value of slider
$( "#slider" ).slider({value:ui.value})
}
});
/////////
});
////////////////
$( "#spinner" ).spinner();
})
</script>

Full Code

<html>
<head>
<title></title>
</head>

<div id="slider"></div>
<div id=d1></div>

<input id="spinner" class='selector' size=3>

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link href="https://code.jquery.com/ui/1.12.1/themes/blitzer/jquery-ui.css" rel="stylesheet">

<script>
$(document).ready(function() {
//////////////////////////
$(function() {
/////////////    
$( "#slider" ).slider({value:50,min: 0,max: 100,step: 1,slide: function( event, ui ) {
$( "#d1" ).html( ui.value );
$( "#spinner" ).val(ui.value) // set the value of spinner
}
});
///////////
$( "#spinner" ).spinner({value:50,min: 0,max: 100,step: 1,spin: function( event, ui ) {
$( "#d1" ).html(ui.value) // set the value of slider
$( "#slider" ).slider({value:ui.value})
}
});
/////////
});
////////////////
$( "#spinner" ).spinner();
})
</script>

</body>
</html>