0

I am doing a rangeslider from Jquery Mobile, and i am trying to make the max amount shows amount+ when it hit a certain point(for example when it hit 1500, it becomes 1500+). I am not sure if it is possible but here are my codes. I am just trying to display 1500+ tho, when i submit the form, i still want the value to be 1500.

 <label for="range-1a">Price:</label>
        <input type="range" name="range-1a" id="range-1a" min="300" max="1000" value="400" step="50">
        <label for="range-1b">Rangeslider:</label>
        <input type="range" name="range-1b" id="range-1b" min="400" max="2000" value="800" step="50">


   <script>
         $(document).on('pageshow',function(){

           var value = document.getElementById("range-1b").value;
if(value =2000){

document.getElementById("range-1b").value="2000+";
}}

      );
        </script>
Ben
  • 27
  • 9
  • I feel like you have the right idea. Instead of setting the value to `"2000+"`, you can set the value to `Number.MAX_VALUE`which is the largest number JavaScript can use. You can read this: http://stackoverflow.com/questions/307179/what-is-javascripts-highest-integer-value-that-a-number-can-go-to-without-losin – invot Nov 10 '14 at 23:00
  • I just tried it, but it won't even run the script tho. Cannot read property 'MAX_VALUE' of undefined – Ben Nov 10 '14 at 23:13

0 Answers0