Javascript 跟踪点击事件
三个不同的饼图将以不同的值显示。(1-1000美元、1000-5000美元和5000美元以上) 当我在一个饼图上单击某个风险级别时,当我切换到另一个饼图时,如何保持该风险级别 原始风险水平 当我滑向一个新的馅饼时,如何保持风险水平?Javascript 跟踪点击事件,javascript,Javascript,三个不同的饼图将以不同的值显示。(1-1000美元、1000-5000美元和5000美元以上) 当我在一个饼图上单击某个风险级别时,当我切换到另一个饼图时,如何保持该风险级别 原始风险水平 当我滑向一个新的馅饼时,如何保持风险水平? $(".slide").on("change", function() { var a = (this.value); if (a < 999) { $('#three, #two, #risk-label-full, #ris
$(".slide").on("change", function() {
var a = (this.value);
if (a < 999) {
$('#three, #two, #risk-label-full, #risk-label-four').hide();
$('#one, #tolerancelist_two, #risk-label-two').show();
} else if (a >= 1000 && a <= 5000) {
$('#risk-label-full').on('click', function(evt) {
$('#risk-label-four').show();
return false;//Returning false prevents the event from continuing up the chain
});
$('#one, #three, #risk-label-two, #risk-label-full').hide();
$('#two, #tolerancelist_four, #risk-label-four').show();
} else if (a >= 5001) {
$('#two, #one, #risk-label-four, #risk-label-two').hide();
$('#three, #tolerancelist_full, #risk-label-full').show();
}
if (a == 10000) {
$('#slider-plus').show();
} else if (a <= 9999) {
$('#slider-plus').hide();
}
});
$(".tolerancerisk_two").click(function(e) {
if( $(this).hasClass("active") ) {
$(this).removeClass("active").addClass("closed");
} else {
// if other menus are open remove open class and add closed
$(this).siblings().removeClass("active").addClass("closed");
$(this).removeClass("closed").addClass("active");
}
});
$(".tolerancerisk_four").click(function(e) {
if( $(this).hasClass("active") ) {
$(this).removeClass("active").addClass("closed");
} else {
// if other menus are open remove open class and add closed
$(this).siblings().removeClass("active").addClass("closed");
$(this).removeClass("closed").addClass("active");
}
});
$(".tolerancerisk_full").click(function(e) {
if( $(this).hasClass("active") ) {
$(this).removeClass("active").addClass("closed");
} else {
// if other menus are open remove open class and add closed
$(this).siblings().removeClass("active").addClass("closed");
$(this).removeClass("closed").addClass("active");
}
});
$(.slide”).on(“更改”,函数(){
var a=(this.value);
如果(a<999){
$(“#三,#二,#风险标签已满,#风险标签四”).hide();
$(“#1,#公差列表#2,#风险标签2”).show();
}否则如果(a>=1000&&a=5001){
$(“#2,#1,#风险标签4,#风险标签2”).hide();
$(“#三,#公差列表#满,#风险标签满”).show();
}
如果(a==10000){
$(“#滑块加号”).show();
}我的问题至少有意义吗?我的问题至少有意义吗