我正在尝试在不同的边距上设置指标的可见性。我有一个滑块,有两个按钮 next n prev。我正在尝试在单击下一步按钮时显示活动幻灯片编号我正在这样做
$("#BtnNext").click(function (event) {
{
if ($('#MainContainer').css("marginLeft") == "0px") {
$('#FirstPage').css("visibility", "hidden");
$('#SecondPage').css("visibility", "visible");
$('#ThirdPage').css("visibility", "Hidden");
$('#FourthPage').css("visibility", "Hidden");
}
if ($('#MainContainer').css("marginLeft") == "-1425px") {
$('#FirstPage').css("visibility", "Hidden");
$('#SecondPage').css("visibility", "Hidden");
$('#ThirdPage').css("visibility", "visible");
$('#FourthPage').css("visibility", "Hidden");
}
if ($('#MainContainer').css("marginLeft") == "-2850px") {
$('#FirstPage').css("visibility", "Hidden");
$('#SecondPage').css("visibility", "Hidden");
$('#ThirdPage').css("visibility", "Hidden");
$('#FourthPage').css("visibility", "visible");
}
if ($('#MainContainer').css("marginLeft") == "-4275px") {
$('#FirstPage').css("visibility", "visible");
$('#SecondPage').css("visibility", "Hidden");
$('#ThirdPage').css("visibility", "Hidden");
$('#FourthPage').css("visibility", "Hidden");
}
}
});
但问题是,在成功完成一轮后,当它再次进行第一张幻灯片时,第一个指示器不会进入可见模式。请帮我