Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [prototype 1.6] - insertion syntax

    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

  • #2
    New Coder
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Never mind, I got it.

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •