Open In App
Related Articles

jQuery UI Spinner min Option

Improve Article
Improve
Save Article
Save
Like Article
Like

The jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. The jQueryUI spinner widget helps us to increment and decrement values of the input element using the up and down arrow. In this article, we will see how to use the min Option in jQuery UI slider. The min Option is used to set the minimum value in the jQuery UI spinner. By default, the value is null.

Syntax:

$( ".selector" ).spinner(
   { min : 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 the min 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 = “https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css” rel = “stylesheet”>

<script src = “https://code.jquery.com/jquery-1.10.2.js”></script>

<script src = “https://code.jquery.com/ui/1.10.4/jquery-ui.js”></script>

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

HTML




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


Output:

Reference: https://api.jqueryui.com/1.11/spinner/#option-min


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 03 Dec, 2021
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials