Search code examples
javascriptjqueryprototypejsjquery-after

prototype.js equivalent of jquery .after()


What is the prototype.js equivalent of following code

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

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