Question

What is the prototype.js equivalent of following code

jQuery('#txtId').after(divdata);
Was it helpful?

Solution

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});

OTHER TIPS

Are looking for this,

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

Ref

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"));
 });
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top