diff --git a/frontend/web/assets/js/pop.js b/frontend/web/assets/js/pop.js index 8b69e5d..9d92586 100644 --- a/frontend/web/assets/js/pop.js +++ b/frontend/web/assets/js/pop.js @@ -13,11 +13,11 @@ $(function(){ $(".model-bg").each(function (i) { var _that=$(this); _that.find(".nextPage").click(function () { - console.log(i); + var key=i-1; _that.addClass("unchoose"); $(".model-bg").eq(i+1).removeClass("unchoose"); $('#side-menu .av').eq(arr[i]).addClass('boo'); - $('#side-menu .av').eq(arr[i-1]).removeClass('boo'); + $('#side-menu .av').eq(arr[key]).removeClass('boo'); }); _that.find(".Previous").click(function () { _that.addClass("unchoose");