{"id":7655,"date":"2015-10-19T16:15:35","date_gmt":"2015-10-19T13:15:35","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=7655"},"modified":"2017-12-21T15:52:51","modified_gmt":"2017-12-21T13:52:51","slug":"jquery-ui-slider-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/","title":{"rendered":"jQuery UI Slider Example"},"content":{"rendered":"<p>The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide variety of uses on websites, like price filtering, choosing amount of items, choosing color from RGB channels etc.<\/p>\n<p>While jQuery packs most of the essential functionality that you can and may think of when using sliders, you might also consider other custom sliders made possible by individuals for free on github.<\/p>\n<p>We&#8217;ll first focus on what jQuery UI library offers by default in terms of functionality and design of sliders and then explore alternatives that can enhance this element even further.<br \/>\n[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<h2>1. Document Setup<\/h2>\n<p>To begin, create a new HTML document and add the basic syntax in it, which obviously includes jQuery UI:<\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;jQuery UI Slider Example&lt;\/title&gt;\r\n      &lt;link href=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.11.4\/themes\/smoothness\/jquery-ui.css\" rel=\"stylesheet\" type=\"text\/css\"\/&gt;\r\n      &lt;script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.3\/jquery.min.js\"&gt;&lt;\/script&gt;\r\n      &lt;script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.11.4\/jquery-ui.min.js\"&gt;&lt;\/script&gt;\r\n      &lt;link href=\"style.css\" rel=\"stylesheet\" type=\"text\/css\"\/&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- STYLE SECTION  --&gt;\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\n\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script type=\"text\/javascript\"&gt;\r\n\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>As you can see, all links refer to online sources of jQuery, jQuery UI so you don&#8217;t have to have these files downloaded to start off. However, the <code>style.css<\/code> is linked offline, but don&#8217;t worry, that is not going to make a big difference to what we&#8217;re doing, because it only contains a font size reduction.<\/p>\n<h2>2. jQuery UI Slider Examples<\/h2>\n<p>The following sections contain default and basic application of the <strong>slider<\/strong> widget.<\/p>\n<h3>2.1 Default Functionality<\/h3>\n<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys. We&#8217;d have only one element in HTML:<\/p>\n<pre class=\"brush:xml\">&lt;div class=\"slider\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>Also, we&#8217;d like to make this slider 30% of its original width to see it better. We do this in CSS by refering to <code>.slider<\/code><\/p>\n<pre class=\"brush:css\">.slider {\r\n    width: 30%;\r\n}\r\n<\/pre>\n<p>Finally, in the JS section, we enable the slider on our element.<\/p>\n<pre class=\"brush:js\">    $(function(){\r\n        $('.slider').slider();\r\n    });\r\n<\/pre>\n<p>Note that <code>$(function(){});<\/code> is equivalent to <code>$(document).ready(function(){});<\/code><\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider1.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7663\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider1.gif\" alt=\"slider1\" width=\"800\" height=\"120\" \/><\/a><\/p>\n<h3>2.2 Colorpicker Example<\/h3>\n<p>In this example we will combine three sliders to create a simple RGB colorpicker.<\/p>\n<pre class=\"brush:xml\">&lt;!-- HTML SECTION  --&gt;\r\n&lt;div id=\"red\"&gt;&lt;\/div&gt;\r\n&lt;div id=\"green\"&gt;&lt;\/div&gt;\r\n&lt;div id=\"blue\"&gt;&lt;\/div&gt;\r\n\r\n&lt;div id=\"swatch\" class=\"ui-widget-content\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>In CSS, we style the three sliders to have their specific RGB colors:<\/p>\n<pre class=\"brush:css\">#red, #green, #blue {\r\n    float: left;\r\n    clear: left;\r\n    width: 300px;\r\n    margin: 15px;\r\n  }\r\n  #swatch {\r\n    width: 120px;\r\n    height: 100px;\r\n    margin-left: 350px;\r\n    background-image: none;\r\n  }\r\n  #red .ui-slider-range { background: #ef2929; }\r\n  #red .ui-slider-handle { border-color: #ef2929; }\r\n  #green .ui-slider-range { background: #8ae234; }\r\n  #green .ui-slider-handle { border-color: #8ae234; }\r\n  #blue .ui-slider-range { background: #729fcf; }\r\n  #blue .ui-slider-handle { border-color: #729fcf; }\r\n<\/pre>\n<p>Now the JS part is a bit complicated, but it basically refreshes the swatch as soon as you drag the slider.<\/p>\n<pre class=\"brush:js\">    function hexFromRGB(r, g, b) {\r\n    var hex = [\r\n      r.toString( 16 ),\r\n      g.toString( 16 ),\r\n      b.toString( 16 )\r\n    ];\r\n    $.each( hex, function( nr, val ) {\r\n      if ( val.length === 1 ) {\r\n        hex[ nr ] = \"0\" + val;\r\n      }\r\n    });\r\n    return hex.join( \"\" ).toUpperCase();\r\n  }\r\n  function refreshSwatch() {\r\n    var red = $( \"#red\" ).slider( \"value\" ),\r\n      green = $( \"#green\" ).slider( \"value\" ),\r\n      blue = $( \"#blue\" ).slider( \"value\" ),\r\n      hex = hexFromRGB( red, green, blue );\r\n    $( \"#swatch\" ).css( \"background-color\", \"#\" + hex );\r\n  }\r\n  $(function() {\r\n    $( \"#red, #green, #blue\" ).slider({\r\n      orientation: \"horizontal\",\r\n      range: \"min\",\r\n      max: 255,\r\n      value: 127,\r\n      slide: refreshSwatch,\r\n      change: refreshSwatch\r\n    });\r\n    $( \"#red\" ).slider( \"value\", 255 );\r\n    $( \"#green\" ).slider( \"value\", 140 );\r\n    $( \"#blue\" ).slider( \"value\", 60 );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider2.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7667\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider2.gif\" alt=\"slider2\" width=\"800\" height=\"200\" \/><\/a><\/p>\n<h3>2.3 Multiple Sliders Example<\/h3>\n<p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player. In the HTMl we&#8217;d have a div element for the master slider and another div for the other sliders, like so:<\/p>\n<pre class=\"brush:xml\">&lt;div id=\"master\" style=\"width:260px; margin:15px;\"&gt;&lt;\/div&gt;\r\n\r\n&lt;div id=\"eq\"&gt;\r\n  &lt;span&gt;88&lt;\/span&gt;\r\n  &lt;span&gt;77&lt;\/span&gt;\r\n  &lt;span&gt;55&lt;\/span&gt;\r\n  &lt;span&gt;33&lt;\/span&gt;\r\n  &lt;span&gt;40&lt;\/span&gt;\r\n  &lt;span&gt;45&lt;\/span&gt;\r\n  &lt;span&gt;70&lt;\/span&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>Just a margin around the <code>span<\/code> elements to make space for each of them:<\/p>\n<pre class=\"brush:css\">#eq &gt; span {\r\n    height:120px; \r\n    float:left; \r\n    margin:15px\r\n  }\r\n<\/pre>\n<p>This time, the slider is given options to it, like <code>orientation<\/code>, <code>range<\/code> and <code>animate<\/code>:<\/p>\n<pre class=\"brush:js\">$(function() {\r\n    \/\/ setup master volume\r\n    $( \"#master\" ).slider({\r\n      value: 60,\r\n      orientation: \"horizontal\",\r\n      range: \"min\",\r\n      animate: true\r\n    });\r\n    \/\/ setup graphic EQ\r\n    $( \"#eq &gt; span\" ).each(function() {\r\n      \/\/ read initial values from markup and remove that\r\n      var value = parseInt( $( this ).text(), 10 );\r\n      $( this ).empty().slider({\r\n        value: value,\r\n        range: \"min\",\r\n        animate: true,\r\n        orientation: \"vertical\"\r\n      });\r\n    });\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider3.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7669\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider3.gif\" alt=\"slider3\" width=\"800\" height=\"228\" \/><\/a><\/p>\n<h3>2.4 Range Slider Example<\/h3>\n<p>Set the <code>range<\/code> option to <code>true<\/code> to capture a range of values with two drag handles. The space between the handles is filled with a different background color to indicate those values are selected.<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Price range:&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n\r\n&lt;div id=\"slider-range\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>The JS section, handles the change as soon as we drag the slider, thus updating the price values:<\/p>\n<pre class=\"brush:js\">$(function() {\r\n    $( \"#slider-range\" ).slider({\r\n      range: true,\r\n      min: 0,\r\n      max: 500,\r\n      values: [ 75, 300 ],\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( \"$\" + ui.values[ 0 ] + \" - $\" + ui.values[ 1 ] );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( \"$\" + $( \"#slider-range\" ).slider( \"values\", 0 ) +\r\n      \" - $\" + $( \"#slider-range\" ).slider( \"values\", 1 ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider4.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7671\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider4.gif\" alt=\"slider4\" width=\"800\" height=\"128\" \/><\/a><\/p>\n<h3>2.5 Range with Fixed Maximum Example<\/h3>\n<p>Fix the maximum value of the range slider so that the user can only select a minimum. Set the range option to <code>\"max\"<\/code>.<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Minimum number of bedrooms:&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n&lt;div id=\"slider-range-max\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>In the JS section, we first set the options <code>min<\/code>, <code>max<\/code> and <code>value<\/code>, to respectively the minimum, the maximum and the initial value of the slider. Then we update the number of the current value depending on the slider position:<\/p>\n<pre class=\"brush:js\">  $(function() {\r\n    $( \"#slider-range-max\" ).slider({\r\n      range: \"max\",\r\n      min: 1,\r\n      max: 10,\r\n      value: 2,\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( ui.value );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( $( \"#slider-range-max\" ).slider( \"value\" ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider5.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7673\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider5.gif\" alt=\"slider5\" width=\"800\" height=\"128\" \/><\/a><\/p>\n<h3>2.6 Range with Fixed Minimum<\/h3>\n<p>Fix the minimum value of the range slider so that the user can only select a maximum. Set the <code>range<\/code> option to <code>\"min\"<\/code>.<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Maximum price:&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n\r\n&lt;div id=\"slider-range-min\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>Just like in the previous example, here we also have a minimum, a maximum and an inital value pre set.<\/p>\n<pre class=\"brush:js\">  $(function() {\r\n    $( \"#slider-range-min\" ).slider({\r\n      range: \"min\",\r\n      value: 37,\r\n      min: 1,\r\n      max: 700,\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( \"$\" + ui.value );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( \"$\" + $( \"#slider-range-min\" ).slider( \"value\" ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider6.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7675\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider6.gif\" alt=\"slider6\" width=\"800\" height=\"128\" \/><\/a><\/p>\n<h3>2.7 Slider Bound to Select<\/h3>\n<p>How to bind a slider to an existing select element. The select stays visible to display the change. When the select is changed, the slider is updated, too.<\/p>\n<pre class=\"brush:xml\">&lt;form id=\"reservation\"&gt;\r\n  &lt;label for=\"minbeds\"&gt;Minimum number of beds&lt;\/label&gt;\r\n  &lt;select name=\"minbeds\" id=\"minbeds\"&gt;\r\n    &lt;option&gt;1&lt;\/option&gt;\r\n    &lt;option&gt;2&lt;\/option&gt;\r\n    &lt;option&gt;3&lt;\/option&gt;\r\n    &lt;option&gt;4&lt;\/option&gt;\r\n    &lt;option&gt;5&lt;\/option&gt;\r\n    &lt;option&gt;6&lt;\/option&gt;\r\n  &lt;\/select&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<p>In this case, we add the <code>div<\/code> element which will add the slider in jQuery and not have it predefined in HTML. We also set <code>min<\/code> and <code>max<\/code> values and a simple algorithm that will change the slider position according to the selection.<\/p>\n<pre class=\"brush:js\">$(function() {\r\n    var select = $( \"#minbeds\" );\r\n    var slider = $( \"&lt;div id='slider'&gt;&lt;\/div&gt;\" ).insertAfter( select ).slider({\r\n      min: 1,\r\n      max: 6,\r\n      range: \"min\",\r\n      value: select[ 0 ].selectedIndex + 1,\r\n      slide: function( event, ui ) {\r\n        select[ 0 ].selectedIndex = ui.value - 1;\r\n      }\r\n    });\r\n    $( \"#minbeds\" ).change(function() {\r\n      slider.slider( \"value\", this.selectedIndex + 1 );\r\n    });\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider7.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7677\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider7.gif\" alt=\"slider7\" width=\"800\" height=\"128\" \/><\/a><\/p>\n<h3>2.8 Snap to Increments Example<\/h3>\n<p>Increment slider values with the <code>step<\/code> option set to an integer, commonly a dividend of the slider&#8217;s maximum value. The default increment is 1.<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Donation amount ($50 increments):&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n\r\n&lt;div id=\"slider\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>Now, adding the <code>step<\/code> to a value of 50, would result in the following:<\/p>\n<pre class=\"brush:js\">  $(function() {\r\n    $( \"#slider\" ).slider({\r\n      value:100,\r\n      min: 0,\r\n      max: 500,\r\n      step: 50,\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( \"$\" + ui.value );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( \"$\" + $( \"#slider\" ).slider( \"value\" ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider8.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7679\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider8.gif\" alt=\"slider8\" width=\"800\" height=\"128\" \/><\/a><\/p>\n<h3>2.9 Vertical Range Slider Example<\/h3>\n<p>Change the orientation of the range slider to vertical. Assign a height value via <code>.height()<\/code> or by setting the height through CSS, and set the <code>orientation<\/code> option to &#8220;vertical.&#8221;<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Target sales goal (Millions):&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n\r\n&lt;div id=\"slider-range\" style=\"height:250px;\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<pre class=\"brush:js\">  $(function() {\r\n    $( \"#slider-range\" ).slider({\r\n      orientation: \"vertical\",\r\n      range: true,\r\n      values: [ 17, 67 ],\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( \"$\" + ui.values[ 0 ] + \" - $\" + ui.values[ 1 ] );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( \"$\" + $( \"#slider-range\" ).slider( \"values\", 0 ) +\r\n      \" - $\" + $( \"#slider-range\" ).slider( \"values\", 1 ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider9.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7682\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider9.gif\" alt=\"slider9\" width=\"800\" height=\"348\" \/><\/a><\/p>\n<h3>2.10 Vertical Slider Example<\/h3>\n<p>Change the orientation of the slider to vertical. Assign a height value via <code>.height()<\/code> or by setting the height through CSS, and set the orientation option to <code>\"vertical\"<\/code>.<\/p>\n<pre class=\"brush:xml\">&lt;p&gt;\r\n  &lt;label for=\"amount\"&gt;Volume:&lt;\/label&gt;\r\n  &lt;input type=\"text\" id=\"amount\" readonly style=\"border:0; color:#f6931f; font-weight:bold;\"&gt;\r\n&lt;\/p&gt;\r\n\r\n&lt;div id=\"slider-vertical\" style=\"height:200px;\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>This time, in contrast to the previous example, we have no <code>range<\/code>, just a normal vertical slider.<\/p>\n<pre class=\"brush:js\">  $(function() {\r\n    $( \"#slider-vertical\" ).slider({\r\n      orientation: \"vertical\",\r\n      range: \"min\",\r\n      min: 0,\r\n      max: 100,\r\n      value: 60,\r\n      slide: function( event, ui ) {\r\n        $( \"#amount\" ).val( ui.value );\r\n      }\r\n    });\r\n    $( \"#amount\" ).val( $( \"#slider-vertical\" ).slider( \"value\" ) );\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider10.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7684\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider10.gif\" alt=\"slider10\" width=\"800\" height=\"296\" \/><\/a><\/p>\n<h2>3. Slider Scrollbar Example<\/h2>\n<p>This example shows how you can use a slider to manipulate the positioning of content on the page. In this case, it acts as a scrollbar with the potential to capture values if needed.<\/p>\n<pre class=\"brush:xml\">&lt;!-- HTML SECTION  --&gt;\r\n&lt;div class=\"scroll-pane ui-widget ui-widget-header ui-corner-all\"&gt;\r\n  &lt;div class=\"scroll-content\"&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;1&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;2&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;3&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;4&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;5&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;6&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;7&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;8&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;9&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;10&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;11&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;12&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;13&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;14&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;15&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;16&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;17&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;18&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;19&lt;\/div&gt;\r\n    &lt;div class=\"scroll-content-item ui-widget-header\"&gt;20&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"scroll-bar-wrap ui-widget-content ui-corner-bottom\"&gt;\r\n    &lt;div class=\"scroll-bar\"&gt;&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre class=\"brush:css\">.scroll-pane { overflow: auto; width: 45%; float:left; }\r\n  .scroll-content { width: 2440px; float: left; }\r\n  .scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }\r\n  .scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }\r\n  .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto;  }\r\n  .scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }\r\n  .scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }\r\n  .scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }\r\n<\/pre>\n<pre class=\"brush:js\">$(function() {\r\n    \/\/scrollpane parts\r\n    var scrollPane = $( \".scroll-pane\" ),\r\n      scrollContent = $( \".scroll-content\" );\r\n\r\n    \/\/build slider\r\n    var scrollbar = $( \".scroll-bar\" ).slider({\r\n      slide: function( event, ui ) {\r\n        if ( scrollContent.width() &gt; scrollPane.width() ) {\r\n          scrollContent.css( \"margin-left\", Math.round(\r\n            ui.value \/ 100 * ( scrollPane.width() - scrollContent.width() )\r\n          ) + \"px\" );\r\n        } else {\r\n          scrollContent.css( \"margin-left\", 0 );\r\n        }\r\n      }\r\n    });\r\n\r\n    \/\/append icon to handle\r\n    var handleHelper = scrollbar.find( \".ui-slider-handle\" )\r\n    .mousedown(function() {\r\n      scrollbar.width( handleHelper.width() );\r\n    })\r\n    .mouseup(function() {\r\n      scrollbar.width( \"100%\" );\r\n    })\r\n    .append( \"&lt;span class='ui-icon ui-icon-grip-dotted-vertical'&gt;&lt;\/span&gt;\" )\r\n    .wrap( \"&lt;div class='ui-handle-helper-parent'&gt;&lt;\/div&gt;\" ).parent();\r\n\r\n    \/\/change overflow to hidden now that slider handles the scrolling\r\n    scrollPane.css( \"overflow\", \"hidden\" );\r\n\r\n    \/\/size scrollbar and handle proportionally to scroll distance\r\n    function sizeScrollbar() {\r\n      var remainder = scrollContent.width() - scrollPane.width();\r\n      var proportion = remainder \/ scrollContent.width();\r\n      var handleSize = scrollPane.width() - ( proportion * scrollPane.width() );\r\n      scrollbar.find( \".ui-slider-handle\" ).css({\r\n        width: handleSize,\r\n        \"margin-left\": -handleSize \/ 2\r\n      });\r\n      handleHelper.width( \"\" ).width( scrollbar.width() - handleSize );\r\n    }\r\n\r\n    \/\/reset slider value based on scroll content position\r\n    function resetValue() {\r\n      var remainder = scrollPane.width() - scrollContent.width();\r\n      var leftVal = scrollContent.css( \"margin-left\" ) === \"auto\" ? 0 :\r\n        parseInt( scrollContent.css( \"margin-left\" ) );\r\n      var percentage = Math.round( leftVal \/ remainder * 100 );\r\n      scrollbar.slider( \"value\", percentage );\r\n    }\r\n\r\n    \/\/if the slider is 100% and window gets larger, reveal content\r\n    function reflowContent() {\r\n        var showing = scrollContent.width() + parseInt( scrollContent.css( \"margin-left\" ), 10 );\r\n        var gap = scrollPane.width() - showing;\r\n        if ( gap &gt; 0 ) {\r\n          scrollContent.css( \"margin-left\", parseInt( scrollContent.css( \"margin-left\" ), 10 ) + gap );\r\n        }\r\n    }\r\n\r\n    \/\/change handle position on window resize\r\n    $( window ).resize(function() {\r\n      resetValue();\r\n      sizeScrollbar();\r\n      reflowContent();\r\n    });\r\n    \/\/init scrollbar size\r\n    setTimeout( sizeScrollbar, 10 );\/\/safari wants a timeout\r\n  });\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider11.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7688\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider11.gif\" alt=\"slider11\" width=\"800\" height=\"328\" \/><\/a><\/p>\n<h2>4. Alternative Sliders<\/h2>\n<p>In addition to jQuery UI default ways of customization regarding design and functionality, you could have even more sliders from the internet. You can find a wide range of custom sliders beautifully designed in this website: <a href=\"http:\/\/www.jqueryrain.com\/demo\/jquery-range-slider\/\" target=\"_blank\">http:\/\/www.jqueryrain.com\/demo\/jquery-range-slider\/<\/a>. Here are some of the alternative sliders you will find on that website:<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider12.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7691\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/slider12.gif\" alt=\"slider12\" width=\"820\" height=\"520\" \/><\/a><\/p>\n<h2>5. Conclusion<\/h2>\n<p>To conclude, it is important to understand that you should consider intuitive ways of representing content and values on your website. For example, you could very well use some select dropdown for all of these values of the examples, but that would be rather unuseful and boring for the users.<\/p>\n<p>As part of a more modern approach of the whole user experience on the web nowadays, jQuery sliders (and those costumized ones based on them) define a great new experience to the end user, which is visually stunning and provides awesome functionality.<\/p>\n<h2>6. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/jQuery-UI-Slider.zip\"><strong>jQuery UI Slider<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide variety of uses on websites, like price filtering, choosing amount of items, choosing color from RGB channels etc. While jQuery packs most of the essential functionality &hellip;<\/p>\n","protected":false},"author":75,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-7655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery UI Slider Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery UI Slider Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-19T13:15:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-21T13:52:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"jQuery UI Slider Example\",\"datePublished\":\"2015-10-19T13:15:35+00:00\",\"dateModified\":\"2017-12-21T13:52:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\"},\"wordCount\":957,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\",\"name\":\"jQuery UI Slider Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2015-10-19T13:15:35+00:00\",\"dateModified\":\"2017-12-21T13:52:51+00:00\",\"description\":\"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery UI Slider Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery UI Slider Example - Web Code Geeks - 2026","description":"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery UI Slider Example - Web Code Geeks - 2026","og_description":"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-10-19T13:15:35+00:00","article_modified_time":"2017-12-21T13:52:51+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"jQuery UI Slider Example","datePublished":"2015-10-19T13:15:35+00:00","dateModified":"2017-12-21T13:52:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/"},"wordCount":957,"commentCount":1,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/","name":"jQuery UI Slider Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2015-10-19T13:15:35+00:00","dateModified":"2017-12-21T13:52:51+00:00","description":"The aim of this example is to take into consideration the usage of jQuery UI Slider. jQuery sliders offer a simple, elegant way to add sliders for a wide","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-ui-slider-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery UI Slider Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/7655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=7655"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/7655\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=7655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=7655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=7655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}