Git Product home page Git Product logo

jqueryslider's People

Watchers

James Cloos avatar

jqueryslider's Issues

a hint needed to enable call back for multiple sliders

I deploy the function:

$(document).ready( function(){

var unit = ['score_playerorder1', 'score_playerorder2', 'score_playerorder3'];

for (var i = 0; i < unit.length; i++) { 
 var field = unit[i];
 var tag = '#id'+ field;
 $.fn.jSlider({
  renderTo: tag,
  size: { barWidth: 120, sliderWidth: 7},
  barCssName: 'bluebar',
  initPosition: 'max',
  onChanged: function(percentage, e) {
  callme(tag, field, percentage);}
 });
}
});

function me(field, unit, percentage){
 if(percentage <=0.15){
  $(field+' input[type=radio][name='+unit+']:eq(0)').attr({checked: true});
  return;
 }
 if(percentage <=0.64) {
  $(field+' input[type=radio][name='+unit+']:eq(1)').attr({checked: true});
  return;
 }
 if(percentage <=0.85) {
  $(field+' input[type=radio][name='+unit+']:eq(2)').attr({checked: true});
  return;
 }
 $(field+' input[type=radio][name='+unit+']:eq(3)').attr({checked: true});
}

The expected output is 3 sidebars each changing its unique grid of inputs
type radio. (total 4 radio in a grid, 3 grids)

Instead all sliders change the value of the last radio grid. i.e. last in
the array unit[], here named as score_playerorder3.

Please give me a hint how to produce a unique callback for different
sliders. How to decouple different sliders from the callback parameters
which have been seen last.


html fragment:
<div class="raiting"><div class="service_word">rate it:</div><div
class="hint">-</div><div id="idscore_playerorder1"><div
class="scorer_row"><input type="radio" name="score_playerorder1" value="1"
 /><input type="radio" name="score_playerorder1" value="2"  /><input
type="radio" name="score_playerorder1" value="3"  /><input type="radio"
name="score_playerorder1" value="4"  /></div></div><div class="hint">+</div>

<div class="raiting"><div class="service_word">rate it:</div><div
class="hint">-</div><div id="idscore_playerorder2"><div
class="scorer_row"><input type="radio" name="score_playerorder2" value="1"
 /><input type="radio" name="score_playerorder2" value="2"  /><input
type="radio" name="score_playerorder2" value="3"  /><input type="radio"
name="score_playerorder2" value="4"  /></div></div><div class="hint">+</div>


Original issue reported on code.google.com by [email protected] on 10 Jul 2009 at 11:23

setSliderValue bug

The setSliderValue method ignore the handle width, i try to fixed like below:  

line 129:
   $sliderProcess(s, s.data.completed, v * (s.data.bar.width() - s.width()));



Original issue reported on code.google.com by zhongxingdou on 19 Aug 2009 at 6:18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.