File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes jquery, difference between Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jquery, difference between "DOM Insertion, Inside" and "DOM Insertion, outside"? " Watch "jquery, difference between "DOM Insertion, Inside" and "DOM Insertion, outside"? " New topic
Author

jquery, difference between "DOM Insertion, Inside" and "DOM Insertion, outside"?

Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
I am reading the jquery API now, but i am comfused about these two:

  • "DOM Insertion, Inside" These methods allow us to insert new content inside an existing element.
  • "DOM Insertion, outside" These methods allow us to insert new content outside an existing element.


  • can anyone explain it to me please? what is existing element refer to? give me an example will be great


    these are the links:
    http://api.jquery.com/category/manipulation/dom-insertion-outside/
    http://api.jquery.com/category/manipulation/dom-insertion-inside/


    ** SCJP 5.0 84% **
    ** SCWCD 1.5 76% **
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 60992
        
      65

    Easy enough.

    "Inside" means just that. The new element becomes a child of the existing element.

    "Outside" means that the new element does not become a child of the existing element, but rather a sibling.




    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    Chrix Wu
    Ranch Hand

    Joined: Nov 15, 2009
    Posts: 121
    Bear Bibeault wrote:Easy enough.

    "Inside" means just that. The new element becomes a child of the existing element.

    "Outside" means that the new element does not become a child of the existing element, but rather a sibling.





    Hi Bear,

    i am currently reading your 《jQuery in Action》, I didn't expect meet you here

    anyway, thanks very much!!
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 60992
        
      65

    Surprise!
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: jquery, difference between "DOM Insertion, Inside" and "DOM Insertion, outside"?