slider

jQuery UI Slider - Value returned from 'slide' event on release is different from 'change' value

时光毁灭记忆、已成空白 提交于 2019-11-29 09:57:52
I have a jQuery UI slider: $('div.slider').slider({ range: true, step: 250, min: 1000, max: 500000, values: [1000,500000], change: function(event, ui){ console.log($(this).slider('values', 0)+','+$(this).slider('values', 1)); }, slide: function(event, ui){ console.log($(this).slider('values', 0)+','+$(this).slider('values', 1)); } }); For some odd reason, when releasing the slider (mouseup) the value changes slightly from what it was. The slide event is returning something different than what the change event is. Anyone have any ideas what might be causing this and how I could solve it? I'm

In sync sliderInput and textInput

只谈情不闲聊 提交于 2019-11-29 09:20:54
问题 Consider the following shiny app: library('shiny') # User Interface/UI ui <- fluidPage( titlePanel( 'Slider and Text input update' ), # titlePanel mainPanel( # Slider input sliderInput( inputId = 'sliderValue', label = 'Slider value', min = 0, max = 1000, value = 500 ), # sliderInput # Text input textInput( inputId = 'textValue', label = NULL ) # textInput ) # mainPanel ) # fluidPage # Server logic server <- function(input, output, session) { observe({ # Update vertical depth text box with

shiny sliderInput from max to min

南楼画角 提交于 2019-11-29 08:06:30
Is it possible to make a sliderInput that shows the values in decreasing order (from left to right; eg. 5 4 3 2 1)? runApp( list( ui = fluidPage( sliderInput("test","", min=5, max=1, value = 3, step=1) ), server = function(input,output) {} ) ) EDIT 2017-10-13: This function is now available in package shinyWidgets (with a different name : sliderTextInput() ). Hi you can write your own slider function like this (it's a little dirty...) : sliderValues <- function (inputId, label, values, from, to = NULL, width = NULL) { sliderProps <- shiny:::dropNulls(list(class = "js-range-slider", id =

How do I add a Marker to a jQuery UI Slider?

核能气质少年 提交于 2019-11-29 06:46:01
I have a simple jQuery UI slider that has a numerical range from 25 to 35. It works fine and the default value is 28. I'm hoping to add a simple tick mark to the slider to indicate that 28 is where the default is. Is there a simple way to add an indicator? $('#cycle_length').slider({ range: "min", value: 28, min: 25, max: 35, step: 1, slide: function( event, ui ) { $( "#amount" ).val( ui.value ); } }); $( "#amount" ).val( $( "#cycle_length" ).slider( "value" ) ); I found a great implementation of the jQuery UI slider here: http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select

jQuery issue - #<an Object> has no method

心已入冬 提交于 2019-11-29 05:24:55
I've tried a veriety of jQuery plugins recently and I keep getting this error … (source: shaunbellis.co.uk ) … regardless of what plugin I try to use. I've checked the links to the JS files which are all there and working fine. I'm using Drupal if that makes any difference. I've run the plugins away from the main site to demonstrate that they are working and that I am doing things right with 100% success. Any ideas? Update: My jQuery file called in the footer: $(document).ready(function() { $('#footer_holder').hide(); // Fancy Box $("a.fancybox").fancybox({ 'hideOnContentClick': true,

Knockoutjs, jquery mobile slider

独自空忆成欢 提交于 2019-11-29 05:21:03
I was wondering if someone had a working example of JQM slider with knockoutjs. I have 2 issues: 1) binding the value to an observable - I can bind it initially i.e. set the "value" of the slider, but this does not update the underlying observable when dragged - I think that this is to do with JQM putting elements over the input to represent it? 2) refreshing the style when changing the min, max, value properties. Here is a subset of what I have, currentItems changes based on a selection: workloadViewModel.filterValues = ko.dependentObservable(function () { var tmp = {}; var itms = this

How to set up multiple sliders with flexslider?

隐身守侯 提交于 2019-11-29 05:07:52
I use flexslider, when i follow instructions on their website it doesn't work for multiple sliders, this is the code: i need a controler nav on both sliders, instructions are here: http://www.woothemes.com/flexslider/ Does anyone what i'm doing wrong? <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <link rel="stylesheet" href="http://www.esens.nl/assets/templates/esens/flexslider/flexslider.css" type="text/css" media="screen" /> <script src="http://www.esens.nl/assets/templates/esens/flexslider/jquery.flexslider-min.js"></script> <!-- Target sliders individually with

How to customize only with css for html5 input range slider-vertical?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 05:05:40
问题 I would like to customize the look of a html5 input[range] when it's vertical. Want to avoid CSS 3 directive like transform:rotate , it complicates the UI layout then. Webkit css properties are recognised in my context, the others vendors are useless in my case. The customisation works good for the horizontal default slider, but not for the vertical one, you can look at here : jsFiddle : http://jsfiddle.net/QU5VD/1/ Otherwise, here's the code : HTML <input type="range" class="vHorizon" />

Scrollable, Carousel, Slider in jquery without any plugin - the simplest way

ぃ、小莉子 提交于 2019-11-29 04:02:42
问题 I looking-for tutorial about jQuery slider (like scrollable plugin) with cycle animation. Without any plugin, the simplest way, tutorial 回答1: UPDATED: 27/08/2014 DEMO: http://so.lucafilosofi.com/scrollable-carousel-slider-in-jquery-without-any-plugin-the-simplest-way $(function() { /* author: Luca Filosofi * contact: aseptik@gmail.com * http://devilmaycode.it * license: Public * Updated: 27/08/2014 */ var animating = false, iXS = 3, $slider = $('.panel-inner'), liW = $slider.find('li:first')

Add tick marks to jQuery slider? [duplicate]

心已入冬 提交于 2019-11-29 04:02:17
This question already has an answer here: How do I add a Marker to a jQuery UI Slider? 1 answer How do I add tick marks to the jQuery slider? Say I have values from 1 to 10, how I can I add a tick at each value? I've seen similar posts on S.O. but they all suggest plug-ins, and I would like to hard code it due to a lot of interactivity with other elements. Thanks! MandoMando Similar to this SO Question . The answer from Mortimer might help. Although there is no official way of doing it yet, it'd be nice to have it baked in the jQuery UI slider. Arie Livshin Thanks Code-Toad. I modified your