相关疑难解决方法(0)

jQuery代码无法在IE中运行

我是jQuery的新手,我正在尝试创建这个页面.在我测试的所有浏览器中,当我点击红色按钮时,会出现优惠券代码,IE除外.为什么会这样?我该如何解决?

我讨厌这个浏览器,真的......

使用Javascript:

$(".coupon_button").live('click', function (event) { 
    $(".coupon_button").remove().fadeOut('slow');
    $(".coupon_main").after($("<div class='coupon_code'>code:newhgcoupon</div>").fadeIn());
    //$(".coupon_main").after().fadeIn('slow').html("<div class='code'>code:newhgcoupon</div>");
});
Run Code Online (Sandbox Code Playgroud)

HTML:

<div class="module">
  <div class="coupon_title">Pay <span class="yellow">1 Cent</span> your First Month</div>
  <div class="coupon_main">To help save you some time, we created a link that takes you directly to the easily missed area on the official Medifast site that lists all of their latest specials and discounts.</div>
  <div class="coupon_button"><img src="button.png" /></div>
  <div class="coupon_footer">Expiration: 11-30-2010</div>
</div>
Run Code Online (Sandbox Code Playgroud)

javascript jquery internet-explorer

3
推荐指数
1
解决办法
1623
查看次数

标签 统计

internet-explorer ×1

javascript ×1

jquery ×1