Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Spinner max Option

Improve Article
Save Article
  • Last Updated : 03 Dec, 2021
Improve Article
Save Article

max Option in the jQuery UI slider. The max Option is used to set the maximum value in the jQuery UI spinner. By default, the value is null.


$( ".selector" ).spinner(
   { max: number | 'string' }

CDN Link: First, add jQuery UI scripts CDN link, needed for your task.

Parameters: This option accepts two parameters as mentioned above and described below:

  • number: This parameter holds the number for max value.
  • string: This parameter will be parsed based on the numberFormat and culture options, otherwise it will fall back to the native parseFloat() method.

<link href = “” rel = “stylesheet”>

<script src = “”></script>

<script src = “”></script>

Example 1: In this example, we will be using the maximum Option of the spinner as 50.


<!doctype html>
<html lang = "en">
      <meta charset = "utf-8">
      <link href
            rel = "stylesheet" />
      <script src
      <script src
         $(function() {
            $( "#gfg" ).spinner( 
               {max: 50}
      <h2>jQuery UI | spinner max option</h2>
      <div id = "geeks">
         <input type = "text" id = "gfg" value = "45" />



My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!