Combined total for multiple jQuery-UI Sliders

后端 未结 6 1245
情深已故
情深已故 2020-11-29 08:02

I\'m trying to implement a page where there are 4 jQuery-UI sliders, and I want to make it so the combined total of all 4 sliders will never go over 400.

I don\'t mi

6条回答
  •  情话喂你
    2020-11-29 08:19

    Not a single one of these answers was the least bit effective for changing sliders in relationship to each other in any effective way...most of them left one or more out of the calculations or did not respect the overall limit , I needed something for allowing a user to pick their chips in an HTML5 game so I came up with this if anyone else ever has a similar issue... if you don't need to tie it to something like changing betting chips then just take out the stop option or change it to suit your needs

        
      array("blue", "1 Point", "1"), "5" => array("red", "5 Points", "5"), "10" => array("gold", "10 Points", "10")); $t = 0; $value_per_row = floor($my_points / count($chips)); $totalc = 0; foreach($chips as $key => $value){ $value = floor($value_per_row / $value[2]); $totalc = $totalc + $value_per_row; ?>
      $value){ ?>

提交回复
热议问题