$("#slider-range-max-day-count").slider({
range: "max",
min: 1,
max: 365,
value: 1,
animate: "fast",
slide: function (event, ui) {
$("#dayCount").text(ui.value);
var invPackageValue = $('#investmentPackage').text();
var dayValue = ui.value;
<?php
$compoundInterest = $CI->compound_int($package, $day, $interest_rate->static_interest);
?>
$("#sliderResult").text(<?php echo $compoundInterest;?>);
}
});
In the function $CI->compound_int($package, $day, $interest_rate->static_interest); how to pass invPackageValue and dayValue instead of $package and $day parameter.