jQuery的insertAfter为IE8 [英] jquery insertAfter for ie8
本文介绍了jQuery的insertAfter为IE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
var attachmentDeleteMainModal = $('#attachment-deletion');
var attachmentDeleteMainModalClone = attachmentDeleteMainModal.clone();
attachmentDeleteMainModalClone.attr('id', 'attachment-deletion-'+'main');
attachmentDeleteMainModalClone.insertAfter('#attachment-deletion');
此方法将我的新选择在Chrome中的DOM,但在IE8无法正常工作,这是我测试至今
This method adds my new selector to the DOM in Chrome, but does not work in ie8, this is all I tested so far
追加
而不是 insertAfter
的不创造任何浏览器所需要的选择。但在IE8不会创建在所有事情
append
instead of insertAfter
does not create the desired selector in either browser. But in ie8 it does not create anything at all
如何解决这个?任何了解AP preciated
what is the solution to this? any insight appreciated
推荐答案
您可以用
$('#attachment-deletion').after(attachmentDeleteMainModalClone);
这篇关于jQuery的insertAfter为IE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文