猫头鹰旋转木马放大焦点项目

时间:2017-04-28 04:06:27

标签: javascript jquery owl-carousel

我尝试在选中时缩放项目,但我不知道要执行此操作的事件 这是我的代码

<div class="loop owl-carousel owl-theme">
        <div class="item" id="item">
          <h4>1</h4>
        </div>
        <div class="item" id="item">
          <h4>2</h4>
        </div>
        <div class="item">
          <h4>3</h4>
        </div>
        <div class="item">
          <h4>4</h4>
        </div>
        <div class="item">
          <h4>5</h4>
        </div>
        <div class="item">
          <h4>6</h4>
        </div>
        <div class="item">
          <h4>7</h4>
        </div>
        <div class="item">
          <h4>8</h4>
        </div>
        <div class="item">
          <h4>9</h4>
        </div>
        <div class="item">
          <h4>10</h4>
        </div>
        <div class="item">
          <h4>11</h4>
        </div>
        <div class="item">
          <h4>12</h4>
        </div>
      </div>

我已经尝试将事件make display = none设置为display = block但是它只能用于第一项

&#13;
&#13;
  var owl = $('.owl-carousel');
    owl.owlCarousel({
    center: true,
  items: 1,
  loop: false,
	margin: 15,
	responsive: {
	  800: {
		items: 7
	  }
	}
	
  });
// Listen to owl events:
owl.on('changed.owl.carousel', function(event) {
   var list = document.getElementById("item");
   if(list.style.display = "none"){
   		list.style.display = "block";
   }else{
   		list.style.display = "none";
   }
})
&#13;
&#13;
&#13;

无论如何都要让选择项放大?

0 个答案:

没有答案