...

View Full Version : [prototype 1.6] - insertion syntax



Arragon
03-29-2008, 09:53 PM
Perhaps it is a caffeine deficiency but I am choking on something that ought to be simple.

I am trying to insert an element into the dom after a specific div and I am having trouble with the syntax.

The documentation does not have any sample code:
http://prototypejs.org/api/element/insert
and everything I have tried that looks right just appends the element into the div.

Can anyone show me an example of the correct syntax for insert, position:after?

Thanks

Arragon
03-29-2008, 10:56 PM
Never mind, I got it.

my_div.insert({'after':my_element});



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum