简体   繁体   中英

Calculations not working in ie9

Alright, so I'm using a slider plugin called ionSlider and am adding some custom functionality to it where based on value of slider I update some areas of the website to have new values/prices, these are not updating in ie9 for some reason.

Usage:

$("#value-calc").ionRangeSlider({
    type: 'single',
    min: 1,
    max: 10,
    values: [1, 3, 5, 10, 20, 35, 50, 100, 200, 500],
    hide_min_max: true,
    onChange: function (data) {
      //Set initial values
      var pricePerUser = 19.99,
          hoursSaved = 72,
          savedPerMonth = 999.00,
          roiPerMonth = 4;

      //Update price per user
      $('#price-user').html('£'+(pricePerUser*data.from_value).toFixed(2));
      //Update hours saved
      $('#hours-saved').html((hoursSaved*data.from_value));
      //Update saved money per month
      $('#saved-month').html('£'+(savedPerMonth*data.from_value).toFixed(2));
      //Update roi
      $('#roi').html((roiPerMonth*data.from_value)+'/month');
    }
  });

您可以使用eval()方法进行检查,希望它可以工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM