📜  选项卡 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:46.185000             🧑  作者: Mango

代码示例1
$('.modal-toggle').on('click', function(e) {
      e.preventDefault();
      var modalopen = $(this).data("openpopup");
      $('.modal--'+modalopen).toggleClass('modal--visible');
      var modaltype = $(this).data("popup");
      $('.modal__content--'+modaltype).toggleClass('modal__content--visible');
            $('.modal__switch').on('click', function(e) {
              $('.modal__content').removeClass('modal__content--visible');
              var modaltypeb = $(this).data("popup");
              $('.modal__content--'+modaltypeb).toggleClass('modal__content--visible');
            });
    });