在Internet Explorer中使用jquery移动节点时出现异常

时间:2013-08-23 09:53:14

标签: jquery internet-explorer adsense

我的代码有点问题。我试图将我的adsense代码从一个节点移动到另一个节点,并且在所有浏览器上运行良好但是与iexplorer崩溃。

这是我在控制台中的错误

  

SCRIPT5009:'数组'没有定义的   show_ads_impl.js,第4行角色29

这是我的代码:

(function($){
  $.fn.moveTo = function(selector){
      return this.each(function(){
          var cl = $(this).clone();
          $(cl).appendTo(selector);
          $(this).remove();
      });
  };
})(jQuery);

$(document).ready(function() {
  $("#download1").moveTo("#adsRoom2");
  $("#download2").moveTo("#adsRoom1");
});

此致

0 个答案:

没有答案