繁体   English   中英

单击功能添加一个类在ie9中不起作用

[英]on click function to add a class is not working in ie9

http://koovay.com/test/rodriguez/

我有一些不同的点击功能设置似乎在IE9中不起作用。

我的标记中有几个.components,其中一个:

<div class="tour-tab component">
<a href="#" id="tour-component"><i class="icon-earth"></i><span> Tour    Dates</span></a>
<div id="event-content" class="component-content">
<div class="attached-art"><span></span></div>
<h2>Upcoming Shows</h2>
  <ul>
  <?php get_template_part( 'content', 'home_tour' ); ?>
  <h4><a href="<?php echo esc_url( home_url( '/' ) ); ?>tour-dates">See  All</a></h4>
  </ul>
</div> <!-- end content -->

$('.component').on('tap', function(e){
  e.preventDefault();
  $('.component.active').not(this).removeClass('active');
  $(this).toggleClass('active');
});

我只是想在组件中添加一个类,而这又会在.component-content中添加一个“display:block”

我正在使用tappy.js这就是为什么说“点击”而不是“点击”,但它无论如何都不起作用......

Tappy文档使用.bind而不是.on。 您是否尝试过使用.bind('tap',...)而不是.on('tap',...)? 这可能就是诀窍。

来自enquire.js的错误导致on.click问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM