0
$("#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;?>);
}
});
としてPHP関数にjqueryの変数を渡します。
これはPHPファイルですか? –
はい、これはPHPファイル – Ashish
jqueryのvaiablesをPHPに渡すためにajaxを使用し、パラメータとして渡すことができます –