var guid = $.URLParams("g"); var typeid = $.URLParams("t"); if (guid == undefined || guid == "") { if (typeid == undefined || typeid == "") { $("#step0").show(); } else { $("#step2").show(); } } else { //再次评测 $("#step3 .sbut-l").hide(); //隐藏上一步 $("#step3").show(); } //家庭年收入 $("#EPFamilyIncomeSlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '10', '20', '50', '100', '500'], heterogeneity: ['20/2', '40/2', '60/10', '80/10', '100/50'], //百分比/step slide: function (event, ui) { sliderZero($('#EPFamilyIncome'), ui); $('#EPFamilyIncome').val(ui.showValue); } }); //现时存款/投资 $("#EPDepositSlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '10', '20', '50', '100', '500'], heterogeneity: ['20/2', '40/2', '60/10', '80/10', '100/50'], //百分比/step slide: function (event, ui) { sliderZero($('#EPDeposit'), ui); $('#EPDeposit').val(ui.showValue); } }); //每月生活开支 $("#EPLivingExpensesSlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '3000', '5000', '20000', '50000', '300000'], heterogeneity: ['20/1000', '40/1000', '60/5000', '80/5000', '100/10000'], //百分比/step slide: function (event, ui) { sliderZero($('#EPLivingExpenses'), ui); $('#EPLivingExpenses').val(ui.showValue); } }); //未偿还的贷款 $("#EPLoanSlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '10', '20', '50', '100', '500'], heterogeneity: ['20/2', '40/2', '60/10', '80/10', '100/50'], //百分比/step slide: function (event, ui) { sliderZero($('#EPLoan'), ui); $('#EPLoan').val(ui.showValue); } }); //赡养老人 $("#EPAlimonySlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '3000', '5000', '20000', '50000', '300000'], heterogeneity: ['20/1000', '40/1000', '60/5000', '80/5000', '100/10000'], //百分比/step slide: function (event, ui) { sliderZero($('#EPAlimony'), ui); $('#EPAlimony').val(ui.showValue); } }); //年收入 $("#EOAnnualIncomeSlider").slider({ min: 0, max: 500, step: 2, range: 'min', animate: true, scale: [0, '10', '20', '50', '100', '500'], heterogeneity: ['20/2', '40/2', '60/10', '80/10', '100/50'], //百分比/step slide: function (event, ui) { sliderZero($('#EOAnnualIncome'), ui); $('#EOAnnualIncome').val(ui.showValue); } }); $(".slider_scale").hide(); function sliderZero($obj, ui) { if (ui.showValue == "0") { $obj.parent().parent().next().find(".ui-slider-handle").css("margin-left", "-3px"); } else { $obj.parent().parent().next().find(".ui-slider-handle").css("margin-left", "-20px"); } }