Demo of Selection of Classes for Spinner in JQuery UI



Select above radio buttons to apply different classes to Spinner

jquery

<script>
$(document).ready(function() {
////////////////
$( "#spinner" ).spinner();
$( ".selector" ).spinner({
  classes: {
  "ui-spinner": "ui-state-highlight",
    }
});
////////////
var present_class = $( "#spinner" ).spinner( "option", "classes.ui-spinner" );
$('#d1').html( " <b>Status of classes    :  </b> " + present_class );

/////
$("input:radio[name=r1]").click(function() {
var present_class = $( "#spinner" ).spinner( "option", "classes.ui-spinner" );
$('#spinner').find('option').remove().end();	
var sel=$(this).val()
$( "#spinner" ).spinner( "option", "classes.ui-spinner", sel );
var present_class = $( "#spinner" ).spinner( "option", "classes.ui-spinner" );
$('#d1').html( " <b>Status of classes    :  </b>: " + present_class );
})
////////////
})
</script>