{"id":14206,"date":"2012-07-06T21:01:52","date_gmt":"2012-07-06T13:01:52","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=14206"},"modified":"2025-04-04T01:10:50","modified_gmt":"2025-04-03T17:10:50","slug":"jquery-volumn-slider","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/","title":{"rendered":"Creating a Volume Controller with jQuery UI Slider"},"content":{"rendered":"<p>If you are a <a href=\"https:\/\/www.hongkiat.com\/blog\/category\/freebies\/\">freebies<\/a> hunter, chances are you have downloaded lots of PSD <a href=\"https:\/\/www.hongkiat.com\/blog\/category\/uiux\/\">user interfaces<\/a> (UI). Some of them are truly amazing and could save our time by prototyping the design we were working on.<\/p>\n<p>In this post we will code a PSD UI and turn it into something more functional. We are going to code the following <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.premiumpixels.com\/freebies\/slider-interface-metal-handle-psd\/\">PSD UI Slider<\/a> to be applied as the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/demos\/slider\/\">jQuery UI Slider<\/a> theme.<\/p>\n<p>However, <strong>please take note<\/strong> that this tutorial is intended for <strong>intermediate levels<\/strong> of experience. Having said that, It\u2019s still relatively easy to follow, so long as you are fairly familiar with CSS and jQuery.<\/p>\n<p>All right, now let\u2019s get started.<\/p>\n<h2>Step 1: the jQuery UI<\/h2>\n<p>We obviously need the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jquery.com\">jQuery<\/a> and the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\">jQuery UI Library<\/a>, and we have two option to utilize them. First, we can link the jQuery and the jQuery UI directly from the following CDN: <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developers.google.com\/speed\/libraries\">Google Ajax API CDN<\/a>, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/ajax\/cdn\/overview\">Microsoft CDN<\/a>, and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/code.jquery.com\/jquery-1.7.2.min.js\">jQuery CDN<\/a>, there are lots of advantages of using the hosted CDN file when we put our site live online.<\/p>\n<p>But since we will only be working on it offline, we will be using the <em>second<\/em> way instead.<\/p>\n<p>We will download and customize the jQuery UI library from the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/download\">official download page<\/a>. As we only need the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/demos\/slider\/\">Slider plugin<\/a>, we will select only the Slider library along with its dependencies and leave the others. That way the files we use will be much slimmer and can load faster. After that, link all those libraries to the HTML document, preferably at the bottom of the page or before the close <code>&lt;\/body&gt;<\/code> tag to be exact.<\/p>\n<pre>\r\n &lt;script src=\"js\/jquery-1.7.2.min.js\"&gt;&lt;\/script&gt;\r\n &lt;script src=\"js\/jquery-ui-1.8.21.custom.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<h2>Step 2: HTML markup<\/h2>\n<p>The markup for the slider is very simple, we wrapped all necessary markup \u2013 the tooltip, the slider, and the volume \u2013 inside an <a href=\"https:\/\/www.hongkiat.com\/blog\/tag\/series-html5-css3-tuts\/\/\">HTML5<\/a> <code>section<\/code> tag. The jQuery UI will then automatically generate the rest.<\/p>\n<pre>\r\n &lt;section&gt; \r\n\t &lt;span class=\"tooltip\"&gt;&lt;\/span&gt; \r\n\t &lt;div id=\"slider\"&gt;&lt;\/div&gt;\r\n\t &lt;span class=\"volume\"&gt;&lt;\/span&gt;\r\n &lt;\/section&gt;<\/pre>\n<h2>Step 3: Install the Slider UI<\/h2>\n<p>The snippet below will install the Slider on the page, but it applies only the default configuration.<\/p>\n<pre>\r\n$(function() {\r\n    $( \"#slider\" ).slider();\r\n});\r\n<\/pre>\n<p>So here we will enhance the slider a little by adding other configurations.<\/p>\n<p>First, we store the slider element as a variable.<\/p>\n<pre>\r\n var slider = $('#slider'),<\/pre>\n<p>Then we set the minimum default value of the slider to be about <strong>35<\/strong>, when it is firstly loaded.<\/p>\n<pre>\r\nslider.slider({\r\n    range: \"min\",\r\n    value: 35,\r\n});\r\n<\/pre>\n<p>At this point, we won\u2019t see anything on the browser yet, because the jQuery UI is <strong>basically only generating the markup<\/strong>. So, we need to apply some styles to start seeing the result visually on the browser.<\/p>\n<h2>Step 4: The Styles<\/h2>\n<p>Before proceeding, we need some assets from the PSD source file such as the background texture and the icon.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg\" width=\"500\" height=\"300\"><\/figure>\n<p>We will not talk about <strong>how to slice<\/strong> in this article, we will just focus on the code. If you aren\u2019t sure how to slice, watch the following screencast first before proceeding.<\/p>\n<ul>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/code.tutsplus.com\/articles\/news\/converting-a-design-from-psd-to-html\/\">Converting a Design from PSD to HTML<\/a> \u2013 <strong>Nettuts+<\/strong><\/li>\n<\/ul>\n<p>All right, now let\u2019s begin adding the styles.<\/p>\n<p>We will start by positioning the slider at the center of the browser\u2019s window and attach the background that we had sliced out from the PSD to the <code>body<\/code>.<\/p>\n<pre>\r\n body {\r\n background: url('..\/images\/bg.jpg') repeat top left;\r\n }\r\n section {\r\n width: 150px;\r\n height: auto;\r\n margin: 100px auto 0;\r\n position: relative;\r\n }<\/pre>\n<p>Next, we will apply the styles for <strong>the tooltip<\/strong>, <strong>the volume<\/strong>, <strong>the handle<\/strong>, the slider <strong>range<\/strong> and the <strong>slider<\/strong> itself.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/anatomy.jpg\" width=\"500\" height=\"300\"><\/figure>\n<p>We will do this part by part, starting with\u2026<\/p>\n<h3>Slider<\/h3>\n<p>Since we did not define the maximum value for the Slider itself, the jQuery UI will apply the default; that is <strong>100<\/strong>. Therefore, we can also apply <strong>100<\/strong> (px) for the slider\u2019s <code>width<\/code>.<\/p>\n<pre>\r\n#slider {\r\n    border-width: 1px;\r\n    border-style: solid;\r\n    border-color: #333 #333 #777 #333;\r\n    border-radius: 25px;\r\n    width: 100px;\r\n    position: absolute;\r\n    height: 13px;\r\n    background-color: #8e8d8d;\r\n    background: url('..\/images\/bg-track.png') repeat top left;\r\n    box-shadow: inset 0 1px 5px 0px rgba(0, 0, 0, .5), \r\n                0 1px 0 0px rgba(250, 250, 250, .5);\r\n    left: 20px;\r\n}\r\n<\/pre>\n<h3>Tooltip<\/h3>\n<p>The tooltip will be positioned above the slider by specifying its <strong>position absolutely<\/strong> with <code>-25px<\/code> for its <strong>top position<\/strong>.<\/p>\n<pre>\r\n.tooltip {\r\n    position: absolute;\r\n    display: block;\r\n    top: -25px;\r\n    width: 35px;\r\n    height: 20px;\r\n    color: #fff;\r\n    text-align: center;\r\n    font: 10pt Tahoma, Arial, sans-serif;\r\n    border-radius: 3px;\r\n    border: 1px solid #333;\r\n    box-shadow: 1px 1px 2px 0px rgba(0, 0, 0, .3);\r\n    box-sizing: border-box;\r\n    background: linear-gradient(top, rgba(69, 72, 77, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%);\r\n}\r\n<\/pre>\n<h3>Volume<\/h3>\n<p>We have modified the volume icon a bit to meet our idea. The idea is we are going to create an effect to <strong>raise the volume bar gradually<\/strong> in accordance with the slider\u2019s value. I\u2019m sure you often seen such an effect in a <a href=\"https:\/\/www.hongkiat.com\/blog\/sleek-video-player-interface-photoshop-tutorial\/\">media player user interface<\/a>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/volume-icon-sprite.jpg\" width=\"500\" height=\"300\"><\/figure>\n<pre>\r\n .volume {\r\n display: inline-block;\r\n width: 25px;\r\n height: 25px;\r\n right: -5px;\r\n background: url('..\/images\/volume.png') no-repeat 0 -50px;\r\n position: absolute;\r\n margin-top: -5px;\r\n }<\/pre>\n<h3>The UI Handle<\/h3>\n<p>The handle\u2019s style is quite simple; it will have an icon that looks like a metallic circle, sliced from the PSD, and attached as the background.<\/p>\n<p>We will also change the cursor mode to <code>pointer<\/code>, so the user will notice that this element is drag-able.<\/p>\n<pre>\r\n.ui-slider-handle {\r\n    position: absolute;\r\n    z-index: 2;\r\n    width: 25px;\r\n    height: 25px;\r\n    cursor: pointer;\r\n    background: url('..\/images\/handle.png') no-repeat 50% 50%;\r\n    font-weight: bold;\r\n    color: #1C94C4;\r\n    outline: none;\r\n    top: -7px;\r\n    margin-left: -12px;\r\n}\r\n<\/pre>\n<h3>The Slider Range<\/h3>\n<p>The slider range will have a slightly white gradient color.<\/p>\n<pre>\r\n.ui-slider-range {\r\n    background: linear-gradient(top, #ffffff 0%,#eaeaea 100%);\r\n    position: absolute;\r\n    border: 0;\r\n    top: 0;\r\n    height: 100%;\r\n    border-radius: 25px;\r\n}\r\n<\/pre>\n<h2>Step 5: The Effect<\/h2>\n<p>In this step we are going to start working on the Slider\u2019s special effect.<\/p>\n<h3>Tooltip<\/h3>\n<p>At this point, the tooltip has no content yet, so we are going to fill it with the slider\u2019s value. Also, the tooltip\u2019s horizontal position will be correspond with the handle\u2019s position.<\/p>\n<p>First of all, we store the tooltip element as a variable.<\/p>\n<pre>\r\n var tooltip = $('.tooltip');<\/pre>\n<p>Then we define the tooltip\u2019s effect we have mentioned above inside the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/demos\/slider\/#event-stop\">Slide Event.<\/a><\/p>\n<pre>\r\n slide: function(event, ui) { \r\n var value = slider.slider('value'),\r\n tooltip.css('left', value).text(ui.value);<\/pre>\n<p>But, we also want the tooltip to be initially hidden.<\/p>\n<pre>\r\n tooltip.hide();<\/pre>\n<p>After that, when the <strong>handle<\/strong> is about to start sliding, it will be shown with a fade-in effect.<\/p>\n<pre>\r\n start: function(event,ui) {\r\n tooltip.fadeIn('fast');\r\n },<\/pre>\n<p>And, when the user stops sliding the handle, the tooltip will fade-out and be hidden.<\/p>\n<pre>\r\n stop: function(event,ui) {\r\n tooltip.fadeOut('fast');\r\n },<\/pre>\n<h3>Volume<\/h3>\n<p>As we have mentioned above in the <strong>Styles section<\/strong>, we plan the volume icon to change correspondingly with the handle\u2019s position or to be exact, <strong>the slider\u2019s value<\/strong>. So, we will apply the following conditional statement to create this effect.<\/p>\n<p>But, firstly, we store the volume element as well as the slider\u2019s value as a variable.<\/p>\n<pre>\r\n volume = $('.volume');<\/pre>\n<p>Then we start the conditional statement.<\/p>\n<p>When the slider\u2019s value is lower or equal to <strong>5<\/strong> the volume icon will have no bars at all, indicating that the volume is very low, but when the slider\u2019s value is increasing, the volume bar will start increasing as well.<\/p>\n<pre>\r\nif (value &lt;= 5) {\r\n    volume.css('background-position', '0 0');\r\n} else if (value &lt;= 25) {\r\n    volume.css('background-position', '0 -25px');\r\n} else if (value &lt;= 75) {\r\n    volume.css('background-position', '0 -50px');\r\n} else {\r\n    volume.css('background-position', '0 -75px');\r\n}<\/pre>\n<h2>Put them all together<\/h2>\n<p>All right, in case you are confused with all the above stuff, don\u2019t be. Here is the shortcut. Put all the following codes into your document.<\/p>\n<pre>\r\n$(function() {\r\n    var slider = $('#slider'),\r\n        tooltip = $('.tooltip');\r\n\r\n    tooltip.hide();\r\n\r\n    slider.slider({\r\n        range: \"min\",\r\n        min: 1,\r\n        value: 35,\r\n\r\n        start: function(event, ui) {\r\n            tooltip.fadeIn('fast');\r\n        },\r\n\r\n        slide: function(event, ui) {\r\n            var value = slider.slider('value'),\r\n                volume = $('.volume');\r\n\r\n            tooltip.css('left', value).text(ui.value);\r\n\r\n            if (value &lt;= 5) {\r\n                volume.css('background-position', '0 0');\r\n            } else if (value &lt;= 25) {\r\n                volume.css('background-position', '0 -25px');\r\n            } else if (value &lt;= 75) {\r\n                volume.css('background-position', '0 -50px');\r\n            } else {\r\n                volume.css('background-position', '0 -75px');\r\n            }\r\n        },\r\n\r\n        stop: function(event, ui) {\r\n            tooltip.fadeOut('fast');\r\n        }\r\n    });\r\n});<\/pre>\n<h2>Conclusion<\/h2>\n<p>Today we have successfully created a more elegant jQuery UI theme, but at the same time, we have also successfully translated a PSD User Interface into a functional volume controller.<\/p>\n<p>We hope this tutorial inspires you and could help you understand how to turn a PSD into a more usable product.<\/p>\n<p>Lastly, if you have any questions regarding this tutorial, feel free to add them in the comments section below.<\/p>","protected":false},"excerpt":{"rendered":"<p>If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by prototyping the design we were working on. In this post we will code a PSD UI and turn it into something more functional. We are going&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392,352],"tags":[911,1877],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Creating a Volume Controller with jQuery UI Slider - Hongkiat<\/title>\n<meta name=\"description\" content=\"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by\" \/>\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.hongkiat.com\/blog\/jquery-volumn-slider\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Volume Controller with jQuery UI Slider\" \/>\n<meta property=\"og:description\" content=\"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-06T13:01:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:10:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"Creating a Volume Controller with jQuery UI Slider\",\"datePublished\":\"2012-07-06T13:01:52+00:00\",\"dateModified\":\"2025-04-03T17:10:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/\"},\"wordCount\":1043,\"commentCount\":30,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-slider\\\/slice.jpg\",\"keywords\":[\"jQuery\",\"slider\"],\"articleSection\":[\"Coding\",\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/\",\"name\":\"Creating a Volume Controller with jQuery UI Slider - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-slider\\\/slice.jpg\",\"datePublished\":\"2012-07-06T13:01:52+00:00\",\"dateModified\":\"2025-04-03T17:10:50+00:00\",\"description\":\"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-slider\\\/slice.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-slider\\\/slice.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-volumn-slider\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Volume Controller with jQuery UI Slider\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating a Volume Controller with jQuery UI Slider - Hongkiat","description":"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by","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.hongkiat.com\/blog\/jquery-volumn-slider\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Volume Controller with jQuery UI Slider","og_description":"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by","og_url":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-07-06T13:01:52+00:00","article_modified_time":"2025-04-03T17:10:50+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"Creating a Volume Controller with jQuery UI Slider","datePublished":"2012-07-06T13:01:52+00:00","dateModified":"2025-04-03T17:10:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/"},"wordCount":1043,"commentCount":30,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg","keywords":["jQuery","slider"],"articleSection":["Coding","Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/","url":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/","name":"Creating a Volume Controller with jQuery UI Slider - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg","datePublished":"2012-07-06T13:01:52+00:00","dateModified":"2025-04-03T17:10:50+00:00","description":"If you are a freebies hunter, chances are you have downloaded lots of PSD user interfaces (UI). Some of them are truly amazing and could save our time by","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-slider\/slice.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-volumn-slider\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating a Volume Controller with jQuery UI Slider"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-3H8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=14206"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14206\/revisions"}],"predecessor-version":[{"id":73534,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14206\/revisions\/73534"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=14206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=14206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=14206"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=14206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}