我有一个旋转木马,它工作得很好,但是当我单击任何圆点时,dot1消失了。我检查了它的css,据我所知,当我单击任何点时,dot1会从某处获得css display:none。

这是我的点代码。

 <ol class="dotss carousel-indicators" style="margin-top: 20px;z-index: 0;">
              <li data-target="#carousel-example-generic" data-slide-to="0" class="abc active"  id="a"></li>
              <li data-target="#carousel-example-generic" data-slide-to="1" class="abc" id="b"></li>
              <li data-target="#carousel-example-generic" data-slide-to="2" class="abc" id="c"></li>
 </ol>


我正在使用此代码为其着色。

 $("ol li").click(function(){
var id= $(this).attr('id');

if (id == "a") {
 $("#a").css("background-color", "white");
 $("#b").css("background-color", "#247ba0");
 $("#c").css("background-color", "#247ba0");
    }
 if (id == "b") {
 $("#b").css("background-color", "white");
 $("#a").css("background-color", "#247ba0");
 $("#c").css("background-color", "#247ba0");
   }
  if (id == "c") {
   $("#c").css("background-color", "white");
   $("#a").css("background-color", "#247ba0");
   $("#b").css("background-color", "#247ba0");
 }



});


这是实时链接。
http://www.millionmilestech.com/innovision/index.html

最佳答案

试试这个代码:

$(document).on('click', '.undo_comment_delete_js', function () {});


它可能会起作用。

10-05 20:45
查看更多