prototype.js相当于jquery .after()

时间:2010-12-07 07:22:54

标签: javascript jquery prototypejs jquery-after

prototype.js等同于以下代码

jQuery('#txtId').after(divdata);

3 个答案:

答案 0 :(得分:7)

http://www.prototypejs.org/api/element/insert

你使用insert看看上面的链接

 $('selector').insert ({'after': 'Content'});

在你的情况下,它看起来像这样

$('#txtId').insert ({'after':divdata});

答案 1 :(得分:0)

正在寻找这个,

new Insertion.After('id of element', "HTML");

Ref

答案 2 :(得分:0)

死了这个工作?我不认为在jquery中有一个像之后的快捷方式。

$(selector).each(function(){
   appendChild(document.createTextNode("Text or html to insert"));
 });