aWebDeveloper
aWebDeveloper

Reputation: 38392

prototype.js equivalent of jquery .after()

What is the prototype.js equivalent of following code

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

Upvotes: 4

Views: 1648

Answers (3)

Breezer
Breezer

Reputation: 10490

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

well you use insert look at the link above

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

in your case it would look like this

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

Upvotes: 7

Jinesh Parekh
Jinesh Parekh

Reputation: 2141

Dies this work? I dont think there is a shortcut like after in jquery.

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

Upvotes: 0

Chinmayee G
Chinmayee G

Reputation: 8117

Are looking for this,

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

Ref

Upvotes: 0

Related Questions