Based on jquery, move the slider to the left and right for source code download,

Source: Internet
Author: User

Based on jquery, move the slider to the left and right for source code download,

Before entering the text, paste it to you to see if you want the effect:

Download demo source code online

The code for setting the slider Based on jQuery. This is a special effect that supports mobile phones. You can drag the slider Range selector and the slider value selector.

If you don't talk much about it, You can directly post code to everyone.

Html code:

<Div class = "demo"> <input type = "hidden" class = "single-slider" value = "0"/> <! -- <Button id = "g1"> get value </button> --> </div> <div class = "demo"> <input class = "range-slider" type = "hidden" value = "10, 89"/> <! -- <Button id = "g2"> get value </button> --> </div>

Js Code:

$(function () {     $('.single-slider').jRange({       from: 0,       to: 100,       step: 1,       scale: [0, 25, 50, 75, 100],       format: '%s',       width: 300,       showLabels: true,       showScale: true     });     $('.range-slider').jRange({       from: 0,       to: 100,       step: 1,       scale: [0, 25, 50, 75, 100],       format: '%s',       width: 300,       showLabels: true,       isRange: true     });     $("#g1").click(function () {       var aa = $(".single-slider").val();       alert(aa);     });     $("#g2").click(function () {       var aa = $(".range-slider").val();       alert(aa);     });   });

Articles you may be interested in:
  • JQuery can drag the div to implement the Code help house correction version
  • JQuery table operations (alternate display, drag table rows, select rows, etc)
  • Use JQuery + EasyDrag to bring up a drag-and-drop Div. At the same time, pass the value to the Div and return the selected value of the Div.
  • Jquery-based code for dragging the mouse
  • Detailed examples of jquery sortable dragging method
  • Implementation principle and example of jQuery drag div, move div, and pop-up layer
  • JQuery plug-in slider to select the price range by dragging the slider

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.